Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] WeavingURLClassLoader - NPE calling addURL(..) without a prior call to define(..)

I have a custom ClassLoader that extends WeavingURLClassLoader. In order to initialize the loader from aop.xml, a ClassLoaderWeavingAdaptor reference is needed which is initialized by WeavingURLClassLoader on the first call to defineClass. (To have WeavingURLClassLoader use ClassLoaderWeavingAdaptor instead of WeavingAdaptor, no aspectURLs are passed to the constructor.)

Since addURL also references the ClassLoaderWeavingAdaptor instance but doesn't check for null, an NPE is generated if addURL is called before defining any class.

Is this a bug?



      


Back to the top