better tracing resource problem

This commit is contained in:
Maxim.Mossienko
2014-02-28 19:19:54 +01:00
parent 32c5c60bf7
commit b8e291a0cb
@@ -514,18 +514,23 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx {
if (classLoader == null && clazz == null) return file;
final URL resource = clazz == null ? classLoader.getResource(file) : clazz.getResource(file);
classLoader = null;
clazz = null;
if (resource == null) {
String message = "Cannot find standard resource. filename:" + file + " class=" + classLoader;
if (ApplicationManager.getApplication().isUnitTestMode()) {
LOG.error(message);
}
else {
LOG.warn(message);
}
return null;
try {
if (resource == null) {
String message = "Cannot find standard resource. filename:" + file + " class=" + clazz + ", classLoader:" + classLoader;
if (ApplicationManager.getApplication().isUnitTestMode()) {
LOG.error(message);
}
else {
LOG.warn(message);
}
return null;
}
}
finally {
classLoader = null;
clazz = null;
}
String path = FileUtil.unquote(resource.toString());
@@ -535,7 +540,6 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx {
return path;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;