aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.markdown1
-rw-r--r--src/delombok/lombok/delombok/PrettyCommentsPrinter.java4
-rw-r--r--test/transform/resource/after-delombok/WithInnerAnnotation.java5
-rw-r--r--test/transform/resource/after-ecj/WithInnerAnnotation.java8
-rw-r--r--test/transform/resource/before/WithInnerAnnotation.java5
5 files changed, 23 insertions, 0 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown
index 9499638b..a92c19a4 100644
--- a/doc/changelog.markdown
+++ b/doc/changelog.markdown
@@ -7,6 +7,7 @@ Lombok Changelog
* BUGFIX: Using `val` with a type like `Outer<TypeArgs>.Inner` now works. [Issue #343](http://code.google.com/p/projectlombok/issues/detail?id=343)
* BUGFIX: `@Getter(lazy=true)` where the variable type is a primitive and the initializing expression is of a different primitive type that would type coerce implicitly, i.e. ints can be assigned to longs without a cast, didn't work before. [Issue #345](http://code.google.com/p/projectlombok/issues/detail?id=345)
* BUGFIX: `val` is no longer legal inside basic for loops (the old kind, not the foreach kind). These variables should rarely be final, and in practice it wasn't possible to delombok this code properly. [Issue #346](http://code.google.com/p/projectlombok/issues/detail?id=346)
+* BUGFIX: PrettyCommentsPrinter now prints default clause of annotation methods. Fixes [Issue #350](http://code.google.com/p/projectlombok/issues/detail?id=350)
### v0.10.8 (January 19th, 2012)
* FEATURE: `@Delegate` can now be used on a no-argument method, which works similarly to adding it to fields. See [documentation](http://projectlombok.org/features/Delegate.html).
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
index 9b3b7eb8..056f5bf4 100644
--- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
@@ -774,6 +774,10 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
print(" throws ");
printExprs(tree.thrown);
}
+ if (tree.defaultValue != null) {
+ print(" default ");
+ print(tree.defaultValue);
+ }
if (tree.body != null) {
print(" ");
printBlock(tree.body.stats, tree.body);
diff --git a/test/transform/resource/after-delombok/WithInnerAnnotation.java b/test/transform/resource/after-delombok/WithInnerAnnotation.java
new file mode 100644
index 00000000..a8decfeb
--- /dev/null
+++ b/test/transform/resource/after-delombok/WithInnerAnnotation.java
@@ -0,0 +1,5 @@
+class WithInnerAnnotation {
+ @interface Inner {
+ int bar() default 42;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/WithInnerAnnotation.java b/test/transform/resource/after-ecj/WithInnerAnnotation.java
new file mode 100644
index 00000000..ac9f161d
--- /dev/null
+++ b/test/transform/resource/after-ecj/WithInnerAnnotation.java
@@ -0,0 +1,8 @@
+class WithInnerAnnotation {
+ @interface Inner {
+ int bar() default 42;
+ }
+ WithInnerAnnotation() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/WithInnerAnnotation.java b/test/transform/resource/before/WithInnerAnnotation.java
new file mode 100644
index 00000000..a8decfeb
--- /dev/null
+++ b/test/transform/resource/before/WithInnerAnnotation.java
@@ -0,0 +1,5 @@
+class WithInnerAnnotation {
+ @interface Inner {
+ int bar() default 42;
+ }
+} \ No newline at end of file