aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2014-05-01 21:04:47 +0200
committerRoel Spilker <r.spilker@gmail.com>2014-05-01 21:04:47 +0200
commit81ba6ee5f5668f4634253f7446de9c93190455b0 (patch)
treed83815aa866c4352bf99756b819263a2043f3145 /src/delombok
parent428edaa1a5b749b084a676ad064358c4d0742c21 (diff)
downloadlombok-81ba6ee5f5668f4634253f7446de9c93190455b0.tar.gz
lombok-81ba6ee5f5668f4634253f7446de9c93190455b0.tar.bz2
lombok-81ba6ee5f5668f4634253f7446de9c93190455b0.zip
javac does not understand @SuppressWarnings("all")
Diffstat (limited to 'src/delombok')
-rw-r--r--src/delombok/lombok/delombok/PrettyCommentsPrinter.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
index a0a11d6c..36413332 100644
--- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
@@ -1587,6 +1587,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
private void visitLambda0(JCTree tree) {
try {
print("(");
+ @SuppressWarnings("unchecked")
List<JCVariableDecl> params = (List<JCVariableDecl>) readTreeList(tree, "params");
boolean explicit = true;
try {
@@ -1617,6 +1618,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
}
}
+ @SuppressWarnings("unchecked")
private List<? extends JCTree> readTreeList(JCTree tree, String fieldName) throws IOException {
try {
return (List<? extends JCTree>) readObject(tree, fieldName);
@@ -1625,6 +1627,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
}
}
+ @SuppressWarnings("unchecked")
private List<JCExpression> readExpressionList(JCTree tree, String fieldName) throws IOException {
try {
return (List<JCExpression>) readObject(tree, fieldName);
@@ -1633,6 +1636,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
}
}
+ @SuppressWarnings("unchecked")
private Object readObject(JCTree tree, String fieldName) throws Exception {
try {
return tree.getClass().getDeclaredField(fieldName).get(tree);