lkishalmi opened a new issue, #4475:
URL: https://github.com/apache/netbeans/issues/4475
### Apache NetBeans version
Apache NetBeans 15 release candidate
### What happened
Just opened and closed some project groups when I got the following
exception:
```
java.lang.IllegalArgumentException: object is not an instance of declaring
class
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader.getLocation(LegacyProjectLoader.java:332)
at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader.createReport(LegacyProjectLoader.java:375)
at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader.exceptionsToProblems(LegacyProjectLoader.java:314)
at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader.loadGradleProject(LegacyProjectLoader.java:243)
at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader.access$200(LegacyProjectLoader.java:89)
[catch] at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader$ProjectLoaderTask.call(LegacyProjectLoader.java:574)
at
org.netbeans.modules.gradle.loaders.LegacyProjectLoader$ProjectLoaderTask.call(LegacyProjectLoader.java:543)
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)
```
Souldn't we do some instance checks before calling methods getLocation and
getLineNumber? If that's not possible, probably we could just swallow this
exception.
### How to reproduce
Well, I wish I could safely reproduce this one.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Ubuntu 22.04
### JDK
JDK17
### Apache NetBeans packaging
Apache NetBeans Snap Package
### Anything else
Well, this one is not a blocker for NetBeans 15.
### Are you willing to submit a pull request?
Yes
### 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: [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