aboutsummaryrefslogtreecommitdiff
path: root/src/delombok/lombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-12-21 19:59:24 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-01-18 18:55:52 +0100
commitf6eef8e50a9cde3643541c077bd138230ff5b96a (patch)
treed092acdc634862a30bf627c0ba3b57ddc6fe9017 /src/delombok/lombok
parent3cca3e018b8867c960d83717af779c119870a316 (diff)
downloadlombok-f6eef8e50a9cde3643541c077bd138230ff5b96a.tar.gz
lombok-f6eef8e50a9cde3643541c077bd138230ff5b96a.tar.bz2
lombok-f6eef8e50a9cde3643541c077bd138230ff5b96a.zip
compiling lombok with javac gives 1 warning. fixed this.
Diffstat (limited to 'src/delombok/lombok')
-rw-r--r--src/delombok/lombok/delombok/PrettyCommentsPrinter.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
index cfe8b6c4..506f5a77 100644
--- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
@@ -632,8 +632,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
*/
public void printUnit(JCCompilationUnit tree, JCClassDecl cdef) throws IOException {
Object dc = getDocComments(tree);
- if (dc instanceof Map) this.docComments = (Map) dc;
- else if (dc instanceof DocCommentTable) this.docTable = (DocCommentTable) dc;
+ loadDocCommentsTable(dc);
printDocComment(tree);
if (tree.pid != null) {
consumeComments(tree.pos, tree);
@@ -668,6 +667,12 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
}
}
// where
+ @SuppressWarnings("unchecked")
+ private void loadDocCommentsTable(Object dc) {
+ if (dc instanceof Map<?, ?>) this.docComments = (Map) dc;
+ else if (dc instanceof DocCommentTable) this.docTable = (DocCommentTable) dc;
+ }
+
boolean isUsed(final Symbol t, JCTree cdef) {
class UsedVisitor extends TreeScanner {
public void scan(JCTree tree) {