[ 
https://issues.apache.org/jira/browse/NETBEANS-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Nabbefeld updated NETBEANS-910:
-------------------------------------
    Component/s: apisupport - Maven

> Editing annotation parameters results in Exceptions thrown
> ----------------------------------------------------------
>
>                 Key: NETBEANS-910
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-910
>             Project: NetBeans
>          Issue Type: Bug
>          Components: apisupport - Maven
>    Affects Versions: 9.0
>         Environment: Linux
>            Reporter: Peter Nabbefeld
>            Priority: Major
>
> I got these exceptions when editing a @TemplateRegistration in a 
> package-info.java file:
> INFO [com.sun.tools.javac.processing.JavacProcessingEnvironment]: Annotation 
> processing error:
> java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data 
> found for annotation element public abstract java.lang.String 
> org.netbeans.api.templates.TemplateRegistration.description() (Found data of 
> type <any>)
>     at 
> com.sun.tools.javac.model.AnnotationProxyMaker$ValueVisitor$1AnnotationTypeMismatchExceptionProxy.generateException(AnnotationProxyMaker.java:275)
>     at 
> sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:84)
>     at com.sun.proxy.$Proxy60.description(Unknown Source)
>     at 
> org.netbeans.modules.templates.TemplateProcessor.process(TemplateProcessor.java:128)
>     at 
> org.netbeans.modules.templates.TemplateProcessor.handleProcess(TemplateProcessor.java:82)
>     at 
> org.openide.filesystems.annotations.LayerGeneratingProcessor.process(LayerGeneratingProcessor.java:122)
> [catch] at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:856)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:752)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:99)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1081)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1157)
>     at 
> com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1210)
>     at 
> com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1099)
>     at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:374)
>     at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:311)
>     at 
> org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:630)
>     at 
> org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:496)
>     at 
> org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:163)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:631)
>     at 
> org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:262)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:798)
>     at org.openide.util.lookup.Lookups.executeWith(Lookups.java:304)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:725)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:686)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
>     at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
>     at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
>     at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
> INFO [com.sun.tools.javac.processing.JavacProcessingEnvironment]: Annotation 
> processing error:
> java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data 
> found for annotation element public abstract java.lang.String 
> org.netbeans.api.templates.TemplateRegistration.scriptEngine() (Found data of 
> type <any>)
>     at 
> com.sun.tools.javac.model.AnnotationProxyMaker$ValueVisitor$1AnnotationTypeMismatchExceptionProxy.generateException(AnnotationProxyMaker.java:275)
>     at 
> sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:84)
>     at com.sun.proxy.$Proxy60.scriptEngine(Unknown Source)
>     at 
> org.netbeans.modules.templates.TemplateProcessor.process(TemplateProcessor.java:153)
>     at 
> org.netbeans.modules.templates.TemplateProcessor.handleProcess(TemplateProcessor.java:82)
>     at 
> org.openide.filesystems.annotations.LayerGeneratingProcessor.process(LayerGeneratingProcessor.java:122)
> [catch] at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:856)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:752)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:99)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1081)
>     at 
> com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1157)
>     at 
> com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1210)
>     at 
> com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1099)
>     at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:374)
>     at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:311)
>     at 
> org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:630)
>     at 
> org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:496)
>     at 
> org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:163)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:631)
>     at 
> org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:262)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:798)
>     at org.openide.util.lookup.Lookups.executeWith(Lookups.java:304)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:725)
>     at 
> org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:686)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
>     at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
>     at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
>     at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
>  
> Instead of throwing exceptions, the editor should just show error hints as 
> long as the values aren't valid.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to