diff --git a/src/main/java/emissary/config/ExtractResource.java b/src/main/java/emissary/config/ExtractResource.java index 36ae8244f9..144088341a 100644 --- a/src/main/java/emissary/config/ExtractResource.java +++ b/src/main/java/emissary/config/ExtractResource.java @@ -116,6 +116,7 @@ public static void main(final String[] args) { } } + @SuppressWarnings("SystemOut") private static void printUsage() { System.out.println("Usage: scripts/run.sh " + ExtractResource.class.getName() + " [ -o output_directory ] package/to/Resource[.cfg] ..."); } diff --git a/src/main/java/emissary/core/ExtractedRecord.java b/src/main/java/emissary/core/ExtractedRecord.java index a21bd36dd6..0d8bd18e33 100644 --- a/src/main/java/emissary/core/ExtractedRecord.java +++ b/src/main/java/emissary/core/ExtractedRecord.java @@ -36,6 +36,7 @@ private void configure() { @Override @Deprecated(forRemoval = true) + @Nullable public List getExtractedRecords() { return null; } diff --git a/src/main/java/emissary/place/CoordinationPlace.java b/src/main/java/emissary/place/CoordinationPlace.java index a40dd5d40b..bd6c18310f 100755 --- a/src/main/java/emissary/place/CoordinationPlace.java +++ b/src/main/java/emissary/place/CoordinationPlace.java @@ -188,8 +188,15 @@ protected void cleanUpHook(IBaseDataObject d) { /** * Classes can override this method to do anything to the list of sprouted data objects from this coordination */ - protected void sproutHook(List sproutList, IBaseDataObject parent) { - logger.debug("In base sproutHook with {}", sproutList.size()); + protected void sproutHook(List sproutCollection, IBaseDataObject d) { + logger.debug("In base sproutHook with {}", sproutCollection.size()); + } + + private void sproutHook(List sproutCollection, IBaseDataObject d, boolean hd) { + // Allow derived classes a shot at the sprouts + if (hd) { + sproutHook(sproutCollection, d); + } } /** @@ -250,7 +257,7 @@ protected List coordinate(IBaseDataObject d, boolean hd) { applyForm(d, errorOccurred); - sproutHook(d, hd, sproutCollection); + sproutHook(sproutCollection, d, hd); // Allow derived classes a shot to clean up the parent cleanUpHook(d); @@ -258,13 +265,6 @@ protected List coordinate(IBaseDataObject d, boolean hd) { return sproutCollection; } - private void sproutHook(IBaseDataObject d, boolean hd, List sproutCollection) { - // Allow derived classes a shot at the sprouts - if (hd) { - sproutHook(sproutCollection, d); - } - } - /** * Allow derived classes a shot to handle a place exception * diff --git a/src/main/java/emissary/util/CharsetUtil.java b/src/main/java/emissary/util/CharsetUtil.java index e93bab8eb0..9d3e4eab3d 100755 --- a/src/main/java/emissary/util/CharsetUtil.java +++ b/src/main/java/emissary/util/CharsetUtil.java @@ -132,7 +132,7 @@ public static char[] jGetUtfCharArray(final byte[] byteArray, @Nullable final St */ public static String getUtfString(final String s, final String charSet) { try { - return new String(s.getBytes("ISO8859_1"), charSet); + return new String(s.getBytes(StandardCharsets.ISO_8859_1), charSet); } catch (UnsupportedEncodingException uue) { logger.warn("Unable to convert to " + charSet); }