Jaroslav Tulach created NETBEANS-3601:
-----------------------------------------
Summary: Error when using Jackpot to add @SuppressWarning
annotation
Key: NETBEANS-3601
URL: https://issues.apache.org/jira/browse/NETBEANS-3601
Project: NetBeans
Issue Type: Bug
Components: java - Hints
Reporter: Jaroslav Tulach
Me and Tomáš Hůrka were trying to write a rule to add {{@SuppressWarnings}}
annotation to all class from a project:
'SuppressWarnings in all classes':
$mods$ class $name extends $extends$ implements $implements$ {
$members$;
}
=>
'Do it!':
@SuppressWarnings("all") $mods$ class $name extends $extends$ implements
$implements$ {
$members$;
}
;;
this is the error that gets generated when the "Do It!" action is invoked:
java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCCompilationUnit
cannot be cast to com.sun.source.tree.ClassTree
at
org.netbeans.spi.java.hints.JavaFixUtilities$JavaFixRealImpl.performRewrite(JavaFixUtilities.java:525)
at org.netbeans.spi.java.hints.JavaFix$1.process(JavaFix.java:171)
at
org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:80)
at
org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:74)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
at
org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
at
org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists