You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within the ClassPathResolver a ClassLoader is used to retrieve a URL resource in the getReader method. This class loader is retrieved from the current thread's defined context class loader. However, if the current thread's context class loader is only Java's bootstrap class loader, the value returned is null.
This causes a null pointer exception to occur when the code attempts to use the bootstrap class loader. Would it be possible to have an exception thrown that the context class loader needs a parent class loader to properly retrieve resources?
Maybe there could be a future solution to the issue to allow that class loader to be optionally defined as an argument that can be passed into that method.
The text was updated successfully, but these errors were encountered:
Within the
ClassPathResolver
a ClassLoader is used to retrieve a URL resource in thegetReader
method. This class loader is retrieved from the current thread's defined context class loader. However, if the current thread's context class loader is only Java's bootstrap class loader, the value returned is null.This causes a null pointer exception to occur when the code attempts to use the bootstrap class loader. Would it be possible to have an exception thrown that the context class loader needs a parent class loader to properly retrieve resources?
Maybe there could be a future solution to the issue to allow that class loader to be optionally defined as an argument that can be passed into that method.
The text was updated successfully, but these errors were encountered: