Jan Lahoda created NETBEANS-253:
-----------------------------------
Summary: Exception for a complex watch when AP is enabled
Key: NETBEANS-253
URL: https://issues.apache.org/jira/browse/NETBEANS-253
Project: NetBeans
Issue Type: Bug
Reporter: Jan Lahoda
Assignee: Jan Lahoda
Attachments: testWatch.zip
Based on:
https://netbeans.org/bugzilla/show_bug.cgi?id=270272
reported by [~cowwoc].
Unpack the attached project, open, place the breakpoint at the marked place in
testwatch.TestWatch, debug the project, and add this watch:
---
java.util.Arrays.stream(args).map(s ->
s.length()).collect(java.util.stream.Collectors.toList());
---
This (with nb-javac on JDK 8) leads to:
---
Annotation: During evaluation of 'java.util.Arrays.stream(args).map(s ->
s.length()).collect(Collectors.toList());'
Annotation: During evaluation of 'java.util.Arrays.stream(args).map(s ->
s.length()).collect(Collectors.toList());'
Annotation: During evaluation of 'java.util.Arrays.stream(args).map(s ->
s.length()).collect(Collectors.toList());'
During evaluation of 'java.util.Arrays.stream(args).map(s ->
s.length()).collect(Collectors.toList());'
During evaluation of 'java.util.Arrays.stream(args).map(s ->
s.length()).collect(Collectors.toList());'
Caused: java.net.MalformedURLException: no protocol: testwatch/TestWatch
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at
org.netbeans.modules.java.source.parsing.ProxyFileManager.asURL(ProxyFileManager.java:555)
Caused: java.lang.IllegalArgumentException: Invalid path argument:
testwatch/TestWatch
at
org.netbeans.modules.java.source.parsing.ProxyFileManager.asURL(ProxyFileManager.java:557)
at
org.netbeans.modules.java.source.parsing.ProxyFileManager.handleOption(ProxyFileManager.java:245)
at
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1332)
at
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1224)
at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:397)
at
org.netbeans.modules.java.source.JavaSourceUtilImpl.generate(JavaSourceUtilImpl.java:230)
at
org.netbeans.modules.java.preprocessorbridge.spi.JavaSourceUtilImpl$MyAccessor.generate(JavaSourceUtilImpl.java:110)
at
org.netbeans.modules.java.preprocessorbridge.api.JavaSourceUtil.generate(JavaSourceUtil.java:149)
at
org.netbeans.modules.debugger.jpda.projects.CodeCompiler.compile(CodeCompiler.java:48)
at
org.netbeans.modules.debugger.jpda.projects.CodeSnippetCompiler.compileToClass(CodeSnippetCompiler.java:63)
at
org.netbeans.modules.debugger.jpda.projects.PreferredCCParser.interpretOrCompileCode(PreferredCCParser.java:459)
at
org.netbeans.modules.debugger.jpda.projects.EditorContextSupport.interpretOrCompileCode(EditorContextSupport.java:1436)
at
org.netbeans.modules.debugger.jpda.projectsui.EditorContextImpl.interpretOrCompileCode(EditorContextImpl.java:825)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.netbeans.modules.debugger.jpda.EditorContextBridge.interpretOrCompileCode(EditorContextBridge.java:111)
at
org.netbeans.modules.debugger.jpda.expr.TreeEvaluator.evaluate(TreeEvaluator.java:182)
at
org.netbeans.modules.debugger.jpda.JavaEvaluator.evaluateIn(JavaEvaluator.java:147)
at
org.netbeans.modules.debugger.jpda.JavaEvaluator.evaluate(JavaEvaluator.java:95)
at
org.netbeans.modules.debugger.jpda.expr.EvaluatorExpression.evaluate(EvaluatorExpression.java:53)
at
org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.evaluateGeneric(JPDADebuggerImpl.java:954)
at
org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.evaluateIn(JPDADebuggerImpl.java:813)
at
org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.evaluateIn(JPDADebuggerImpl.java:836)
at
org.netbeans.modules.debugger.jpda.ui.models.WatchesModel$JPDAWatchEvaluating.getValue(WatchesModel.java:435)
at
org.netbeans.modules.debugger.jpda.ui.models.WatchesModel$JPDAWatchEvaluating.getType(WatchesModel.java:393)
at
org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilterSI.getChildrenCount(VariablesTreeModelFilterSI.java:193)
at
org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:945)
at
org.netbeans.modules.debugger.jpda.ui.FixedWatchesManager.getChildrenCount(FixedWatchesManager.java:228)
at
org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:945)
at
org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilter.getChildrenCount(VariablesTreeModelFilter.java:317)
at
org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:945)
at
org.netbeans.modules.debugger.jpda.ui.models.PendingActionsFilter.getChildrenCount(PendingActionsFilter.java:81)
at
org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:945)
at
org.netbeans.spi.viewmodel.Models$CompoundModel.getChildrenCount(Models.java:4414)
at
org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.getModelChildren(TreeModelNode.java:1460)
[catch] at
org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.run(TreeModelNode.java:1421)
at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
---
(In some other circumstances (with --source 9, with vanilla javac), the
exception is different although it refers to the same problem.)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
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