From 42f7d379a430aaf2fad169f0170de04072b08b10 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 22 Apr 2016 14:48:04 -0400 Subject: Formatting changes --- .../utils/components/FileComponentRepository.java | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java index 8b0d303..bc1b990 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java @@ -98,27 +98,9 @@ public class FileComponentRepository } } - private void loadComponent(Function componentReader, - Path pth) { - try { - E component = componentReader.apply(pth.toFile()); - - if (component == null) { - throw new NullPointerException( - "Component reader read null component"); - } else if (!components.containsKey(component.getName())) { - components.put(component.getName(), component); - } else { - CLASS_LOGGER.warn("Found a duplicate component.\n" - + "Multiple versions of the same component are not currently supported.\n" - + "The component" + component - + " will not be registered ."); - } - } catch (Exception ex) { - CLASS_LOGGER.warn("Error found reading component from file " - + pth.toString() - + ". This component will not be loaded", ex); - } + @Override + public E getComponentByName(String name) { + return components.get(name); } @Override @@ -141,8 +123,26 @@ public class FileComponentRepository return "Components read from directory " + sourceDirectory + "."; } - @Override - public E getComponentByName(String name) { - return components.get(name); + private void loadComponent(Function componentReader, + Path pth) { + try { + E component = componentReader.apply(pth.toFile()); + + if (component == null) { + throw new NullPointerException( + "Component reader read null component"); + } else if (!components.containsKey(component.getName())) { + components.put(component.getName(), component); + } else { + CLASS_LOGGER.warn("Found a duplicate component.\n" + + "Multiple versions of the same component are not currently supported.\n" + + "The component" + component + + " will not be registered ."); + } + } catch (Exception ex) { + CLASS_LOGGER.warn("Error found reading component from file " + + pth.toString() + + ". This component will not be loaded", ex); + } } } \ No newline at end of file -- cgit v1.2.3