Skip to content

Commit

Permalink
use separatorChar instead of slash
Browse files Browse the repository at this point in the history
  • Loading branch information
software2000 authored and Philipp Schmitt committed Nov 28, 2023
1 parent 4c4193f commit 4bda0d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public static String locationFor(Class javaClass) {
return path.substring(0, path.length() - convertToClassFileName(javaClass).length() - 1);
} else if ("jrt".equals(protocol)) {
// jdk9 - jrt:/java.base/java/lang/Object.class
return path.substring(0, path.indexOf('/', 5));
return path.substring(0, path.indexOf(File.separatorChar, 5));
}

throw new IllegalStateException(url.toString());
Expand Down

0 comments on commit 4bda0d7

Please sign in to comment.