mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting)
This commit is contained in:
@@ -277,13 +277,13 @@ public class UrlClassLoader extends ClassLoader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL findResource(final String name) {
|
||||
Resource res = _getResource(name);
|
||||
public URL findResource(String name) {
|
||||
Resource res = findResourceImpl(name);
|
||||
return res != null ? res.getURL() : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Resource _getResource(final String name) {
|
||||
private Resource findResourceImpl(String name) {
|
||||
String n = FileUtil.toCanonicalUriPath(name);
|
||||
Resource resource = getClassPath().getResource(n, true);
|
||||
if (resource == null && n.startsWith("/")) { // compatibility with existing code, non-standard classloader behavior
|
||||
@@ -294,12 +294,13 @@ public class UrlClassLoader extends ClassLoader {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public InputStream getResourceAsStream(final String name) {
|
||||
if (myAllowBootstrapResources) return super.getResourceAsStream(name);
|
||||
public InputStream getResourceAsStream(String name) {
|
||||
if (myAllowBootstrapResources) {
|
||||
return super.getResourceAsStream(name);
|
||||
}
|
||||
try {
|
||||
Resource res = _getResource(name);
|
||||
if (res == null) return null;
|
||||
return res.getInputStream();
|
||||
Resource res = findResourceImpl(name);
|
||||
return res != null ? res.getInputStream() : null;
|
||||
}
|
||||
catch (IOException e) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user