Skip to content

Commit

Permalink
Removed unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
jshiell committed Jan 11, 2020
1 parent 89ff262 commit bbedfb2
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/main/java/org/infernus/idea/checkstyle/util/Objects.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
package org.infernus.idea.checkstyle.util;

import java.net.URL;
import java.net.URLClassLoader;

import com.intellij.util.lang.UrlClassLoader;
import org.jetbrains.annotations.NotNull;


public final class Objects {

private Objects() {
Expand Down Expand Up @@ -36,30 +29,4 @@ public static <T extends Comparable<T>> int compare(final T obj1, final T obj2)
return obj1.compareTo(obj2);
}


public static String getClassPath(@NotNull final ClassLoader pClassLoader) {
StringBuilder sb = new StringBuilder();
sb.append("Class loader implementation: ");
sb.append(pClassLoader.getClass().getName());
sb.append(System.lineSeparator());

sb.append("URLs:");
sb.append(System.lineSeparator());
if (pClassLoader instanceof UrlClassLoader) {
final UrlClassLoader pluginClassLoader = (UrlClassLoader) pClassLoader;
for (final URL url : pluginClassLoader.getUrls()) {
sb.append("\t- ");
sb.append(url);
sb.append(System.lineSeparator());
}
} else if (pClassLoader instanceof URLClassLoader) {
final URLClassLoader urlClassLoader = (URLClassLoader) pClassLoader;
for (final URL url : urlClassLoader.getURLs()) {
sb.append("\t- ");
sb.append(url);
sb.append(System.lineSeparator());
}
}
return sb.toString();
}
}

0 comments on commit bbedfb2

Please sign in to comment.