Skip to content

Commit 8199ca7

Browse files
committed
Remove workaround for bug fixed in JDK 9 and later
1 parent bb31561 commit 8199ca7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

junit-platform-commons/src/main/java/org/junit/platform/commons/util/DefaultClasspathScanner.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,7 @@ private String determineSimpleResourceName(Path resourceFile) {
260260
private String determineSubpackageName(Path baseDir, Path file) {
261261
Path relativePath = baseDir.relativize(file.getParent());
262262
String pathSeparator = baseDir.getFileSystem().getSeparator();
263-
String subpackageName = relativePath.toString().replace(pathSeparator, PACKAGE_SEPARATOR_STRING);
264-
if (subpackageName.endsWith(pathSeparator)) {
265-
// TODO: Remove workaround for JDK bug: https://bugs.openjdk.org/browse/JDK-8153248
266-
subpackageName = subpackageName.substring(0, subpackageName.length() - pathSeparator.length());
267-
}
268-
return subpackageName;
263+
return relativePath.toString().replace(pathSeparator, PACKAGE_SEPARATOR_STRING);
269264
}
270265

271266
private void handleInternalError(Path classFile, String fullyQualifiedClassName, InternalError ex) {

0 commit comments

Comments
 (0)