mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -100,7 +100,7 @@ public class PluginClassLoader extends UrlClassLoader {
|
||||
@Nullable
|
||||
private Class loadClassFromParents(final String name, Set<ClassLoader> visited) {
|
||||
for (ClassLoader parent : myParents) {
|
||||
if (visited == null) visited = ContainerUtilRt.<ClassLoader>newHashSet(this);
|
||||
if (visited == null) visited = ContainerUtilRt.newHashSet(this);
|
||||
if (!visited.add(parent)) {
|
||||
continue;
|
||||
}
|
||||
@@ -134,10 +134,7 @@ public class PluginClassLoader extends UrlClassLoader {
|
||||
try {
|
||||
c = _findClass(name);
|
||||
}
|
||||
catch (IncompatibleClassChangeError e) {
|
||||
throw new PluginException("While loading class " + name + ": " + e.getMessage(), e, myPluginId);
|
||||
}
|
||||
catch (UnsupportedClassVersionError e) {
|
||||
catch (IncompatibleClassChangeError | UnsupportedClassVersionError e) {
|
||||
throw new PluginException("While loading class " + name + ": " + e.getMessage(), e, myPluginId);
|
||||
}
|
||||
if (c != null) {
|
||||
@@ -249,14 +246,14 @@ public class PluginClassLoader extends UrlClassLoader {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PluginClassLoader[" + myPluginId + ", " + myPluginVersion + "]";
|
||||
return "PluginClassLoader[" + myPluginId + ", " + myPluginVersion + "] "+super.toString();
|
||||
}
|
||||
|
||||
private static class DeepEnumeration implements Enumeration<URL> {
|
||||
private final Enumeration<URL>[] myEnumerations;
|
||||
private int myIndex = 0;
|
||||
private int myIndex;
|
||||
|
||||
public DeepEnumeration(Enumeration<URL>[] enumerations) {
|
||||
DeepEnumeration(@NotNull Enumeration<URL>[] enumerations) {
|
||||
myEnumerations = enumerations;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ public class Version {
|
||||
return null;
|
||||
}
|
||||
|
||||
int minor = (versions.length > 1) ? parseNumber(versions[1], -1) : 0;
|
||||
int minor = versions.length > 1 ? parseNumber(versions[1], -1) : 0;
|
||||
if (minor < 0) {
|
||||
return new Version(major, 0, 0);
|
||||
}
|
||||
|
||||
int patch = (versions.length > 2) ? parseNumber(versions[2], -1) : 0;
|
||||
int patch = versions.length > 2 ? parseNumber(versions[2], -1) : 0;
|
||||
if (patch < 0) {
|
||||
return new Version(major, minor, 0);
|
||||
}
|
||||
@@ -105,9 +105,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public int compareTo(@Nullable Integer major, @Nullable Integer minor, @Nullable Integer bugfix) {
|
||||
int result;
|
||||
|
||||
result = doCompare(this.major, major);
|
||||
int result = doCompare(this.major, major);
|
||||
if (result != 0) return result;
|
||||
|
||||
result = doCompare(this.minor, minor);
|
||||
|
||||
Reference in New Issue
Block a user