[pretty] Make the tests work with the new delombok formatting options.

This commit is contained in:
Roel Spilker authored and Reinier Zwitserloot committed 2013-12-11 22:40:48 +01:00
1 parent 54c30d98c0
commit 9639bc2ff4
6 files changed
+27 -26

No files matched your search

+1 -1
View File
@@ -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;
@@ -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();
}
}
@@ -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();
}
@@ -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;
}
@@ -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;
}
@@ -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();
}
}
}