Skip to content

Commit

Permalink
simplify name of UberClassloader and update since TODOs
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
  • Loading branch information
jtnord and jglick authored May 15, 2024
1 parent 34cd0b6 commit 070fc93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/hudson/ClassicPluginStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,23 +271,23 @@ public static List<PluginWrapper.Dependency> getImpliedDependencies(String plugi
/**
* @deprecated since TODO use {@link #createClassLoader(String, List, ClassLoader, Attributes)}
*/
@Deprecated(since = "//TODO")
@Deprecated(since = "TODO")
protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent) throws IOException {
return createClassLoader(paths, parent, null);
}

/**
* @deprecated since TODO use {@link #createClassLoader(String, List, ClassLoader, Attributes)}
*/
@Deprecated(since="@TODO")
@Deprecated(since="TODO")
protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent, Attributes atts) throws IOException {
// generate a legacy id so at least we can track to something
return createClassLoader("legacy"+UUID.randomUUID(), paths, parent, atts);
return createClassLoader("unidentified-" + UUID.randomUUID(), paths, parent, atts);
}

/**
* Creates a classloader that can load all the specified jar files and delegate to the given parent.
* @since //TODO
* @since TODO
*/
protected ClassLoader createClassLoader(String name, List<File> paths, ClassLoader parent, Attributes atts) throws IOException {
boolean usePluginFirstClassLoader =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@ public static final class UberClassLoader extends ClassLoader {
}

public UberClassLoader(List<PluginWrapper> activePlugins) {
super(activePlugins.stream().map(PluginWrapper::getShortName).collect(Collectors.joining(", ", "UberClassLoader for ", "")), PluginManager.class.getClassLoader());
super("UberClassLoader", PluginManager.class.getClassLoader());
this.activePlugins = activePlugins;
}

Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/jenkins/util/URLClassLoader2.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public class URLClassLoader2 extends URLClassLoader implements JenkinsClassLoade
/**
* @deprecated use {@link URLClassLoader2#URLClassLoader2(String, URL[])}
*/
@Deprecated(since = "//TODO")
@Deprecated(since = "TODO")
public URLClassLoader2(URL[] urls) {
super(urls);
}

/**
* @deprecated use {@link URLClassLoader2#URLClassLoader2(String, URL[], ClassLoader)}
*/
@Deprecated(since = "//TODO")
@Deprecated(since = "TODO")
public URLClassLoader2(URL[] urls, ClassLoader parent) {
super(urls, parent);
}
Expand All @@ -37,7 +37,7 @@ public URLClassLoader2(URL[] urls, ClassLoader parent) {
* Create a new {@link URLClassLoader2} with the given name and URLS and the {@link #getSystemClassLoader()} as its parent.
* @param name name of this classloader.
* @param urls the list of URLS to find classes in.
* @since //TODO
* @since TODO
*/
public URLClassLoader2(String name, URL[] urls) {
super(name, urls, getSystemClassLoader());
Expand All @@ -48,7 +48,7 @@ public URLClassLoader2(String name, URL[] urls) {
* @param name name of this classloader.
* @param urls the list of URLS to find classes in.
* @param parent the parent to search for classes before we look in the {@code urls}
* @since //TODO
* @since TODO
*/
public URLClassLoader2(String name, URL[] urls, ClassLoader parent) {
super(name, urls, parent);
Expand Down

0 comments on commit 070fc93

Please sign in to comment.