https://bz.apache.org/bugzilla/show_bug.cgi?id=58271

Stefan Bodewig <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #3 from Stefan Bodewig <[email protected]> ---
TBH I don't remember why the code was written the way it is and haven't been
involved with writing it at all - just wanted to avoid fixing code for cosmetic
reasons that wasn't broken.

Looking at the code my guess is the special case for BSF that immediately
before the Class.forName call is required for it to work when using BSF and the
code needs a way to ensure BSF is actually there before modifying the
classloader hierarchy.

The problem we should really talk about is LoaderUtils.classNameToResource
which is also used inside the JUnit task.  We use it to tell people we've found
multiple versions of JUnit.  Not only that, we also tell them where we've found
them.  How would we achieve the same with using reflection alone?

The LoaderUtils.classExists that uses LoaderUtils.classNameToResource is only
used inside the BSF classloader hack so shouldn't be a problem if we manage to
fix the hack.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to