From 0248218c3c98b21634d4e3a3c4213b81153fa097 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Wed, 25 Sep 2024 08:39:36 +0200 Subject: [PATCH] Remove unused method. --- .../bytebuddy/build/maven/ByteBuddyMojo.java | 32 ++----------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java b/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java index 58241ea414..1e7f847d50 100644 --- a/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java +++ b/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java @@ -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; @@ -453,34 +455,6 @@ protected Plugin.Engine.Summary transform(List classPath, } } - /** - * Discovers plugins from an input stream representing a META-INF/net.bytebuddy/build.plugins 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 undiscoverable, List transformers, @MaybeNull List 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. *