Skip to content

Commit

Permalink
Protect self-attach from execution as source file.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Dec 22, 2024
1 parent 94f0e35 commit da6026b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1447,8 +1447,8 @@ private static File trySelfResolve(Class<?> installer) throws IOException {
}
URL location = codeSource.getLocation();
if (!location.getProtocol().equals("file")
|| location.getPath() == null
|| !location.getPath().endsWith(".class")) {
|| location.getPath() != null
&& location.getPath().endsWith(".java")) {
return null;
}
File agentJar;
Expand Down

0 comments on commit da6026b

Please sign in to comment.