From d90b774abb56f04ccaa7a32aeb94673720c75240 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Mon, 23 Dec 2024 00:08:10 +0100 Subject: [PATCH] Not needed as checked for being a jar. --- .../src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java index 8d5a77ec92..26f63f8c37 100644 --- a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java +++ b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java @@ -1446,9 +1446,7 @@ private static File trySelfResolve(Class installer) throws IOException { return null; } URL location = codeSource.getLocation(); - if (!location.getProtocol().equals("file") - || location.getPath() != null - && location.getPath().endsWith(".java")) { + if (!location.getProtocol().equals("file")) { return null; } File agentJar;