[CXF-8041]catch unchecked exceptions for all ResourceResolvers so all ResourceResolvers have chance to run
@@ -114,7 +114,20 @@ public class DefaultResourceManager implements ResourceManager {
if (asStream) {
ret = type.cast(rr.getAsStream(name));
} else {
+ try {
ret = rr.resolve(name, type);
+ } catch (RuntimeException ex) {
+ //ResourceResolver.resolve method expected to
+ //return an instance of the resource or null if the
+ //resource cannot be resolved. So we just catch
+ //Unchecked exceptions during resolving resource and log it.
+ //So other ResourceResolver get chance to be used
+ if (LOG.isLoggable(Level.FINE)) {
+ LOG.log(Level.FINE,
+ "run into exception when using" + rr.getClass().getName(), ex);
+ }
+
+ }
}
if (ret != null) {
break;
