Skip to content

Commit

Permalink
Remove unused method.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Sep 25, 2024
1 parent 27e12fe commit 0248218
Showing 1 changed file with 3 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
import org.sonatype.plexus.build.incremental.BuildContext;

import java.io.*;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
Expand Down Expand Up @@ -453,34 +455,6 @@ protected Plugin.Engine.Summary transform(List<? extends String> classPath,
}
}

/**
* Discovers plugins from an input stream representing a <i>META-INF/net.bytebuddy/build.plugins</i> file.
*
* @param inputStream The input stream to read from.
* @param undiscoverable A set of undiscoverable plugins.
* @param transformers The list of transformers to add discovered plugins to.
* @param classPath The class path elements to add if a plugin is loaded from the class path or {@code null} if the plugin is discovered as a dependency
* @throws IOException If an I/O exception occurs.
*/
private void discover(InputStream inputStream, Set<String> undiscoverable, List<Transformer> transformers, @MaybeNull List<String> classPath) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
try {
String line;
while ((line = reader.readLine()) != null) {
if (undiscoverable.add(line)) {
transformers.add(classPath == null
? new Transformer.ForDiscoveredPlugin(line)
: new Transformer.ForDiscoveredPlugin.FromClassLoader(line, classPath));
getLog().debug("Registered discovered plugin: " + line);
} else {
getLog().info("Skipping discovered plugin " + line + " which was previously discovered or registered");
}
}
} finally {
reader.close();
}
}

/**
* Makes a best effort of locating the configured Java version.
*
Expand Down

0 comments on commit 0248218

Please sign in to comment.