diff options
author | Roel Spilker <r.spilker@gmail.com> | 2010-11-29 22:43:44 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2010-11-29 22:43:44 +0100 |
commit | b0072a17eba21cdc6f8ba51693bb39d1c9aba319 (patch) | |
tree | 163706efa8fe6233b1da0dadd2872ec8682d91fb /test/transform | |
parent | dd0fded2bfbd5c318913209e93d74a2bb06f3d14 (diff) | |
download | lombok-b0072a17eba21cdc6f8ba51693bb39d1c9aba319.tar.gz lombok-b0072a17eba21cdc6f8ba51693bb39d1c9aba319.tar.bz2 lombok-b0072a17eba21cdc6f8ba51693bb39d1c9aba319.zip |
lombok.val import now gets removed. Only adding lombok.val flags the compilation unit as changed.
Diffstat (limited to 'test/transform')
8 files changed, 19 insertions, 8 deletions
diff --git a/test/transform/resource/after-delombok/ValInFor.java b/test/transform/resource/after-delombok/ValInFor.java index a04d0f0c..013cd02e 100644 --- a/test/transform/resource/after-delombok/ValInFor.java +++ b/test/transform/resource/after-delombok/ValInFor.java @@ -9,11 +9,11 @@ public class ValInFor { final java.lang.String v = a; } } -/* public void enhancedFor() { + public void enhancedFor() { java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); - for (val shouldBeString : list) { + for (final java.lang.String shouldBeString : list) { System.out.println(shouldBeString.toLowerCase()); - val shouldBeString2 = shouldBeString; + final java.lang.String shouldBeString2 = shouldBeString; } - }*/ + } }
\ No newline at end of file diff --git a/test/transform/resource/before/ValComplex.java b/test/transform/resource/before/ValComplex.java index 5f718003..c2e53011 100644 --- a/test/transform/resource/before/ValComplex.java +++ b/test/transform/resource/before/ValComplex.java @@ -1,3 +1,5 @@ +import lombok.val; + public class ValComplex { private ValSimple field = new ValSimple(); private static final int CONSTANT = 20; diff --git a/test/transform/resource/before/ValErrors.java b/test/transform/resource/before/ValErrors.java index 7c5c0a8b..96181638 100644 --- a/test/transform/resource/before/ValErrors.java +++ b/test/transform/resource/before/ValErrors.java @@ -1,3 +1,5 @@ +import lombok.val; + public class ValErrors { public void unresolvableExpression() { val c = d; diff --git a/test/transform/resource/before/ValInFor.java b/test/transform/resource/before/ValInFor.java index af13540e..ebe7287c 100644 --- a/test/transform/resource/before/ValInFor.java +++ b/test/transform/resource/before/ValInFor.java @@ -1,3 +1,5 @@ +import lombok.val; + public class ValInFor { { val x = 10; @@ -10,11 +12,11 @@ public class ValInFor { } } -/* public void enhancedFor() { + public void enhancedFor() { java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); for (val shouldBeString : list) { System.out.println(shouldBeString.toLowerCase()); val shouldBeString2 = shouldBeString; } - }*/ + } }
\ No newline at end of file diff --git a/test/transform/resource/before/ValLessSimple.java b/test/transform/resource/before/ValLessSimple.java index bae7b73b..31f8030d 100644 --- a/test/transform/resource/before/ValLessSimple.java +++ b/test/transform/resource/before/ValLessSimple.java @@ -1,3 +1,5 @@ +import lombok.val; + public class ValLessSimple { private short field2 = 5; diff --git a/test/transform/resource/before/ValSimple.java b/test/transform/resource/before/ValSimple.java index 15508bbc..04763be2 100644 --- a/test/transform/resource/before/ValSimple.java +++ b/test/transform/resource/before/ValSimple.java @@ -1,3 +1,5 @@ +import lombok.val; + public class ValSimple { private String field = "field"; private short field2 = 5; diff --git a/test/transform/resource/before/ValWeirdTypes.java b/test/transform/resource/before/ValWeirdTypes.java index 855fb91f..302ef841 100644 --- a/test/transform/resource/before/ValWeirdTypes.java +++ b/test/transform/resource/before/ValWeirdTypes.java @@ -1,4 +1,5 @@ import java.util.*; +import lombok.val; public class ValWeirdTypes<Z> { private final List<Z> fieldList; diff --git a/test/transform/resource/messages-delombok/ValErrors.java.messages b/test/transform/resource/messages-delombok/ValErrors.java.messages index ca7baeab..bd59ad3b 100644 --- a/test/transform/resource/messages-delombok/ValErrors.java.messages +++ b/test/transform/resource/messages-delombok/ValErrors.java.messages @@ -1,2 +1,2 @@ -3:21 ERROR Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved -7:21 ERROR 'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... }) +5:21 ERROR Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved +9:21 ERROR 'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... }) |