mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better tracing resource problem
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user