Bug 577010 - [loader] avoid ClassNotFoundExceptions

Instead of throwing ClassNotFoundException a null value should be
returned when delegating.  This avoid unnecessarily generating an
exception in the normal flow of the code.  An exception should only be
generated when required by the APIs we are implementing in OSGi
(Bundle.loadClass) or the JVM (ClassLoader.loadClass).

There is a special case where a ClassNotFoundException is thrown when a
class load triggers a lazy activation and the bundle fails to start with
a BundleException.  But generally null can be used for "normal" class
not founds when delegating.

Change-Id: Ic8add2176ee5e80a79212629950b63724f9f28e8
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Signed-off-by: Jörg Kubitz <jkubitz-eclipse@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/187105
Tested-by: Equinox Bot <equinox-bot@eclipse.org>
7 files changed