Opened 16 years ago

Closed 16 years ago

#1345 closed enhancement (fixed)

JarClassLoader should have the possibility to load classes in it's own class path before checking parent class loader

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.13
Component: core Version:
Keywords: Cc:

Description

With the current implementation of JarClassLoader the parent class loader is always asked first to load a class. The classpath of the JarClassLoader is only checked if the parent doesn't find the class. There is usually nothing wrong with this, except that it might create a problem for BASE plug-ins that want to use a specfic version of a JAR that is also included in the core BASE distribution. If the two versions are incompatible it may cause the plug-in to not work at all. A possible scenario is that a new JAR is added in BASE in some 2.x version that will cause existing plug-ins to stop working because the depend on some other (older) version.

I think we should make the behaviour configurable. In the MANIFEST.MF we could look for an entry to decide if the parent class loader should be checked first or not. The default should be to check the class path of the JarClassLoader first.

Change History (2)

comment:1 by Nicklas Nordborg, 16 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 by Nicklas Nordborg, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [5013]) Fixes #1345: JarClassLoader should have the possibility to load classes in it's own class path before checking parent class loader

Note: See TracTickets for help on using tickets.