You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/09/21 09:18:38 UTC

[GitHub] [netbeans] incognitoTheta opened a new issue, #4668: Error when trying to add lambda arrow into Collectors.mapping method

incognitoTheta opened a new issue, #4668:
URL: https://github.com/apache/netbeans/issues/4668

   ### Apache NetBeans version
   
   Apache NetBeans 15
   
   ### What happened
   
   ` Stream.of(
                   new Student("Fred", 87, "Math", "Physics"),
           ).collect(Collectors.groupingBy(s-> letterGrade(s), Collectors.mapping(s->)))      `
   
   For this particular code, everytime I add the lambda arrow into Collectors.mapping method I receive this Netbeans error:
   
   UnexpectedException details:
   
   Annotation: An error occurred during parsing of 'C:\Users\Radu\Documents\NetBeansProjects\Stream\src\main\java\stream\pearson\DownstreamCollecting2.java'. Please report a bug against java/source and attach dump file 'C:\Users\Radu\AppData\Roaming\NetBeans\15\var\log\DownstreamCollecting2_59.dump'.
   An error occurred during parsing of 'C:\Users\Radu\Documents\NetBeansProjects\Stream\src\main\java\stream\pearson\DownstreamCollecting2.java'. Please report a bug against java/source and attach dump file 'C:\Users\Radu\AppData\Roaming\NetBeans\15\var\log\DownstreamCollecting2_59.dump'.
   Caused by: java.lang.IllegalStateException: java.lang.ClassCastException
   	at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:383)
   	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:770)
   	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:540)
   	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:141)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
   	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
   	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	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)
   Caused by: java.lang.ClassCastException
   An error occurred during parsing of 'C:\Users\Radu\Documents\NetBeansProjects\Stream\src\main\java\stream\pearson\DownstreamCollecting2.java'. Please report a bug against java/source and attach dump file 'C:\Users\Radu\AppData\Roaming\NetBeans\15\var\log\DownstreamCollecting2_59.dump'.
   
   
   ### How to reproduce
   
   ` Stream.of(
                   new Student("Fred", 87, "Math", "Physics"),
           ).collect(Collectors.groupingBy(s-> letterGrade(s), Collectors.mapping(s-)))      `
   
   To reproduce the error just add ">" after "-" in mapping argument
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   open jdk 11
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   This problem occures everytime.
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] neilcsmith-net commented on issue #4668: Error when trying to add lambda arrow into Collectors.mapping method

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4668:
URL: https://github.com/apache/netbeans/issues/4668#issuecomment-1254830397

   > Please report a bug against java/source and attach dump file 'C:\Users\Radu\AppData\Roaming\NetBeans\15\var\log\DownstreamCollecting2_59.dump'.
   
   Please attach that file to the bug report, thanks.
   
   It's not reproducible here.  Is this a clean install, or have you imported settings from a previous version?  What build system?  Can you attach a simple project that fails for you with this error to the report as well?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] incognitoTheta commented on issue #4668: Error when trying to add lambda arrow into Collectors.mapping method

Posted by GitBox <gi...@apache.org>.
incognitoTheta commented on issue #4668:
URL: https://github.com/apache/netbeans/issues/4668#issuecomment-1255817129

   [DownstreamCollecting2_59.zip](https://github.com/apache/netbeans/files/9630873/DownstreamCollecting2_59.zip)
   
   I imported the settings from previous versions (14,13,12,11...if I remember right)
   
   ![netbeans error](https://user-images.githubusercontent.com/54666517/191897286-29e44ac8-959d-4f83-9681-a7b1bb2dee47.png)
   
   [test-local-app.zip](https://github.com/apache/netbeans/files/9630918/test-local-app.zip)
   
   I attached the requested files.
   I don't know what you mean by build system. Can you detail please? 
   
   Thanks
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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