All following JDOClassLoaderResolver#getResources returns the very same Enumeration which is empty now, because of the cache.

2nd issue with the cache:

if the ClassLoaderResolver cache resources, runtime classloader changes are not going to be effective in datanucleus.

let caching and performance improvements to the underlying classloaders

Description

JDOClassLoaderResolver has a cache:
Map<String, Enumeration> multiResources
1st issue with the cache:
Enumeration#nextElement() will change the state.
Supposing 1st JDOClassLoaderResolver#getResources returning 2 element, 2 Enumeration#nextElement() will empty out.
All following JDOClassLoaderResolver#getResources returns the very same Enumeration which is empty now, because of the cache.
2nd issue with the cache:
if the ClassLoaderResolver cache resources, runtime classloader changes are not going to be effective in datanucleus.
let caching and performance improvements to the underlying classloaders