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

   ### Apache NetBeans version
   
   Apache NetBeans latest daily build
   
   ### What happened
   
   While testing master (6c17cc6c78f07c04460ad42ea2e7876510329c31) I noticed 
this exception:
   
   ```
        [exec] java.lang.ClassCastException: class 
org.netbeans.modules.csl.editor.semantic.SequenceElement cannot be cast to 
class java.lang.Comparable 
(org.netbeans.modules.csl.editor.semantic.SequenceElement is in unnamed module 
of loader org.netbeans.StandardModule$OneModuleClassLoader @bad9ea; 
java.lang.Comparable is in module java.base of loader 'bootstrap')
        [exec]     at java.base/java.util.TreeMap.compare(TreeMap.java:1604)
        [exec]     at 
java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:811)
        [exec]     at java.base/java.util.TreeMap.put(TreeMap.java:820)
        [exec]     at java.base/java.util.TreeMap.put(TreeMap.java:569)
        [exec]     at java.base/java.util.TreeSet.add(TreeSet.java:259)
        [exec]     at 
org.netbeans.modules.csl.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:123)
        [exec]     at 
org.netbeans.modules.csl.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:58)
        [exec]     at 
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
        [exec] [catch] at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
        [exec]     at 
org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
        [exec]     at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
        [exec]     at 
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
        [exec]     at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        [exec]     at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        [exec]     at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
        [exec]     at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        [exec]     at 
org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
        [exec]     at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)
   ```
   
   This points directly to: PR #8028, which made `SequenceElement` non 
comparable, yet stuffs these type into a `TreeSet`.
   
   ### Language / Project Type / NetBeans Component
   
   CSL API
   
   ### How to reproduce
   
   - Start a recent master build
   - Create a JS file with this content:
     ```
     var a = 1;
     var b = a;
     ```
   - Place cursor on variable `a`
   
   You should see a highlight of both occurrences of the variable, but you get 
an exception.
   
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 24
   
   ### Operating System
   
   Ubuntu 24.10
   
   ### JDK
   
   Ubuntu JDK 21
   
   ### Apache NetBeans packaging
   
   Other
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
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

Reply via email to