diff options
6 files changed, 27 insertions, 26 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java index fb1098b5..23400771 100644 --- a/src/delombok/lombok/delombok/Delombok.java +++ b/src/delombok/lombok/delombok/Delombok.java @@ -79,7 +79,7 @@ public class Delombok { private String classpath, sourcepath, bootclasspath; private LinkedHashMap<File, File> fileToBase = new LinkedHashMap<File, File>(); private List<File> filesToParse = new ArrayList<File>(); - private Map<String, String> formatPrefs = null; + private Map<String, String> formatPrefs = new HashMap<String, String>(); /** If null, output to standard out. */ private File output = null; diff --git a/test/pretty/resource/after/TryWithResources.java b/test/pretty/resource/after/TryWithResources.java index 1a8b82e2..eb622f2c 100644 --- a/test/pretty/resource/after/TryWithResources.java +++ b/test/pretty/resource/after/TryWithResources.java @@ -2,7 +2,7 @@ import java.io.PrintWriter; public class TryWithResources { { - try (final PrintWriter pw = new PrintWriter(System.out);) { + try (PrintWriter pw = new PrintWriter(System.out)) { pw.println(); } } diff --git a/test/transform/resource/after-delombok/ValInTryWithResources.java b/test/transform/resource/after-delombok/ValInTryWithResources.java index 73f8d1a2..9aae99a2 100644 --- a/test/transform/resource/after-delombok/ValInTryWithResources.java +++ b/test/transform/resource/after-delombok/ValInTryWithResources.java @@ -2,7 +2,7 @@ import java.io.IOException; public class ValInTryWithResources { public void whyTryInsteadOfCleanup() throws IOException { - try (final java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class");) { + try (java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class")) { final java.io.InputStream i = in; final int j = in.read(); } diff --git a/test/transform/resource/after-delombok/ValWithLabel.java b/test/transform/resource/after-delombok/ValWithLabel.java index 82cd4ed7..4d8eabf2 100644 --- a/test/transform/resource/after-delombok/ValWithLabel.java +++ b/test/transform/resource/after-delombok/ValWithLabel.java @@ -1,6 +1,7 @@ public class ValWithLabel { { - LABEL: for (final java.lang.String x : new String[0]) { + LABEL: + for (final java.lang.String x : new String[0]) { if (x.toLowerCase() == null) { continue LABEL; } diff --git a/test/transform/resource/before/ConstructorsWithAccessors.java b/test/transform/resource/before/ConstructorsWithAccessors.java index d242317d..e5d2939f 100644 --- a/test/transform/resource/before/ConstructorsWithAccessors.java +++ b/test/transform/resource/before/ConstructorsWithAccessors.java @@ -1,6 +1,6 @@ @lombok.AllArgsConstructor @lombok.experimental.Accessors(prefix={"p", "_"}) class ConstructorsWithAccessors { - int plower; - int pUpper; - int _huh; - int __huh2; + int plower; + int pUpper; + int _huh; + int __huh2; } diff --git a/test/transform/resource/before/ExtensionMethodPlain.java b/test/transform/resource/before/ExtensionMethodPlain.java index 8c2f369d..f954d01f 100644 --- a/test/transform/resource/before/ExtensionMethodPlain.java +++ b/test/transform/resource/before/ExtensionMethodPlain.java @@ -2,22 +2,22 @@ import lombok.experimental.ExtensionMethod; @ExtensionMethod({java.util.Arrays.class, ExtensionMethodPlain.Extensions.class}) class ExtensionMethodPlain { - public String test() { - int[] intArray = {5, 3, 8, 2}; - intArray.sort(); - - String iAmNull = null; - return iAmNull.or("hELlO, WORlD!".toTitleCase()); - } - - static class Extensions { - public static <T> T or(T obj, T ifNull) { - return obj != null ? obj : ifNull; - } - - public static String toTitleCase(String in) { - if (in.isEmpty()) return in; - return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase(); - } - } + public String test() { + int[] intArray = {5, 3, 8, 2}; + intArray.sort(); + + String iAmNull = null; + return iAmNull.or("hELlO, WORlD!".toTitleCase()); + } + + static class Extensions { + public static <T> T or(T obj, T ifNull) { + return obj != null ? obj : ifNull; + } + + public static String toTitleCase(String in) { + if (in.isEmpty()) return in; + return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase(); + } + } } |