Community
Participate
Working Groups
The re-factorings in org.eclipse.osgi.internal.loader.buddy.GlobalPolicy#loadClass and #loadResource done for Bug 570394 will cause a NPE when trying to load a class but no bundle found exporting the package of the requested class. >Caused by: java.lang.NullPointerException > at java.base/java.util.Optional.orElseGet(Optional.java:369) > at org.eclipse.osgi.internal.loader.buddy.GlobalPolicy.loadResource(GlobalPolicy.java:66) > at org.eclipse.osgi.internal.loader.buddy.PolicyHandler.doBuddyResourceLoading(PolicyHandler.java:171) > at org.eclipse.osgi.internal.loader.BundleLoader.findResource(BundleLoader.java:685) > at org.eclipse.osgi.internal.loader.ModuleClassLoader.getResource(ModuleClassLoader.java:216) > at org.eclipse.osgi.internal.framework.ContextFinder.getResource(ContextFinder.java:161) I think the cause is the wrongly use Optional.orElseGet(null) while Optional.orElse(null) would be correct to restore the previous behavior with just returning <null> in such a case. See also https://www.eclipse.org/forums/index.php/m/1838925/#msg_1838925 for similar problem report. This failure in BuddyPolicy:global classloading will prevent our application from running and it's a blocker to upgrade to 4.19.
(In reply to Rhodan76 from comment #0) > I think the cause is the wrongly use Optional.orElseGet(null) while > Optional.orElse(null) would be correct to restore the previous behavior with > just returning <null> in such a case. Thanks for your bug report! Would you like to provide a patch via gerrit? See https://wiki.eclipse.org/Platform/How_to_Contribute
*** Bug 571991 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/177841
(In reply to Andrey Loskutov from comment #1) > (In reply to Rhodan76 from comment #0) > > I think the cause is the wrongly use Optional.orElseGet(null) while > > Optional.orElse(null) would be correct to restore the previous behavior with > > just returning <null> in such a case. > > Thanks for your bug report! Would you like to provide a patch via gerrit? > See https://wiki.eclipse.org/Platform/How_to_Contribute That would have been a fine idea for a good first bug fix. I was already working on a fix and testcase as well as checking that the other usage of orElseGet method was correct in the framework.
Wow, already fixed by Thomas. Thank you!
Gerrit change https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/177841 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=480fff1c579af9243d7a24d02ff111596ea027bc
(In reply to Rhodan76 from comment #5) > Wow, already fixed by Thomas. Thank you! Admittedly I was embarrassed by the incorrect usage of orElseGet that I introduced to the code. Thanks for the report.
New Gerrit change created: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/178221
Gerrit change https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/178221 was merged to [R4_19_maintenance]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=939dcd7a6d46e75c53dbc61a334d84c2e69704ed
*** Bug 572634 has been marked as a duplicate of this bug. ***
Is there something planned regarding making this bugfix available to end-users? Right now I'm having to ask users to skip this version because it breaks PyDev and I don't see any workaround...
(In reply to Fabio Zadrozny from comment #11) > Is there something planned regarding making this bugfix available to > end-users? > > Right now I'm having to ask users to skip this version because it breaks > PyDev and I don't see any workaround... Indeed, for 4.19, it seems like this won't work at all and there is no workaround. You can tell your users to use the Platform I-Builds instead, or Platform 4.20.M1 (to be published tomorrow). Please reach out to the mailing-list to ask whether anyone has plans to do a 4.19.1 release of the Eclipse project with the backported patch. But I wouldn't place too much hope in that.
(In reply to Mickael Istria from comment #12) > (In reply to Fabio Zadrozny from comment #11) > > Is there something planned regarding making this bugfix available to > > end-users? > > > > Right now I'm having to ask users to skip this version because it breaks > > PyDev and I don't see any workaround... > > Indeed, for 4.19, it seems like this won't work at all and there is no > workaround. > You can tell your users to use the Platform I-Builds instead, or Platform > 4.20.M1 (to be published tomorrow). > Please reach out to the mailing-list to ask whether anyone has plans to do a > 4.19.1 release of the Eclipse project with the backported patch. But I > wouldn't place too much hope in that. Would it be possible to add a softlink in https://download.eclipse.org/releases/ to point to https://download.eclipse.org/releases/2021-06/? "latest" points to https://download.eclipse.org/releases/2021-03/ afaik which is not usable. Something like https://download.eclipse.org/releases/snapshot/ additionally to https://download.eclipse.org/releases/latest/ would do.