From 4c73407dc7f68fffd7d3166f6e01118d331d3a68 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Nov 2009 17:34:05 +0100 Subject: Solved or suppressed warnings --- src/delombok/lombok/delombok/PrettyCommentsPrinter.java | 1 + src/delombok/lombok/delombok/PrettyPrinter.java | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java index 68e503a7..aa42f2b5 100644 --- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java +++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java @@ -107,6 +107,7 @@ import com.sun.tools.javac.util.Name; * This code and its internal interfaces are subject to change or * deletion without notice. */ +@SuppressWarnings("all") // Mainly sun code that has other warning settings public class PrettyCommentsPrinter extends JCTree.Visitor { private static final Method GET_TAG_METHOD; diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java index 2da0d9f4..caea38c9 100644 --- a/src/delombok/lombok/delombok/PrettyPrinter.java +++ b/src/delombok/lombok/delombok/PrettyPrinter.java @@ -115,12 +115,13 @@ public class PrettyPrinter { return null; } node.accept(new SimpleTreeVisitor(){ + @SuppressWarnings("incomplete-switch") @Override - protected Void defaultAction(Tree node, Void p) { - if (node == null) { + protected Void defaultAction(Tree treeNode, Void r) { + if (treeNode == null) { return null; } - JCTree tree = (JCTree)node; + JCTree tree = (JCTree)treeNode; Kind kind = tree.getKind(); System.out.print(kind.toString() + " " + tree.pos + " - " + tree.getEndPosition(cu.endPositions)); switch (kind) { @@ -167,10 +168,8 @@ public class PrettyPrinter { if (input instanceof CharBuffer) { return new PrettyDocCommentScanner(this, (CharBuffer)input, context.get(Comments.class)); } - else { - char[] array = input.toString().toCharArray(); - return newScanner(array, array.length); - } + char[] array = input.toString().toCharArray(); + return newScanner(array, array.length); } @Override -- cgit