diff options
-rw-r--r-- | src/delombok/lombok/delombok/PrettyCommentsPrinter.java | 5 | ||||
-rw-r--r-- | test/pretty/resource/after/DefaultMethod.java | 8 | ||||
-rw-r--r-- | test/pretty/resource/before/DefaultMethod.java | 11 |
3 files changed, 23 insertions, 1 deletions
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java index 79f22e58..9dd7e40e 100644 --- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java +++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java @@ -126,6 +126,9 @@ public class PrettyCommentsPrinter extends JCTree.Visitor { private static final Map<TreeTag, String> OPERATORS; + // StandardFlags | DEFAULT + private static final long EXTENDED_STANDARD_FLAGS = 0x0fffL | 1L<<43; + static { Map<TreeTag, String> map = new HashMap<TreeTag, String>(); @@ -493,7 +496,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor { suppressFinalAndSemicolonsInTry = false; } print(TreeInfo.flagNames(flags)); - if ((flags & StandardFlags) != 0) print(" "); + if ((flags & EXTENDED_STANDARD_FLAGS) != 0) print(" "); if ((flags & ANNOTATION) != 0) print("@"); } diff --git a/test/pretty/resource/after/DefaultMethod.java b/test/pretty/resource/after/DefaultMethod.java new file mode 100644 index 00000000..864ba60f --- /dev/null +++ b/test/pretty/resource/after/DefaultMethod.java @@ -0,0 +1,8 @@ +interface DefaultMethod { + int size(); + default boolean isEmpty() { + return size() == 0; + } + default strictfp void run() { + } +}
\ No newline at end of file diff --git a/test/pretty/resource/before/DefaultMethod.java b/test/pretty/resource/before/DefaultMethod.java new file mode 100644 index 00000000..e0358c7a --- /dev/null +++ b/test/pretty/resource/before/DefaultMethod.java @@ -0,0 +1,11 @@ +// version 8: +interface DefaultMethod { + int size(); + + default boolean isEmpty() { + return size() == 0; + } + + default strictfp void run() { + } +}
\ No newline at end of file |