8245401: AbsPathsInImage.java fails on Windows on jdwp.dll

Reviewed-by: mikael, ihse
This commit is contained in:
Erik Joelsson 2020-05-20 14:30:28 -07:00
parent 3802524153
commit 822ec45b02

View File

@ -151,10 +151,10 @@ public class AbsPathsInImage {
return super.visitFile(file, attrs); return super.visitFile(file, attrs);
} else if (fileName.endsWith(".debuginfo") || fileName.endsWith(".pdb")) { } else if (fileName.endsWith(".debuginfo") || fileName.endsWith(".pdb")) {
// Do nothing // Do nothing
} else if (fileName.endsWith("jvm.dll") || fileName.endsWith("jpackage.dll")) { } else if (fileName.endsWith(".dll")) {
// On Windows, the Microsoft toolchain does not provide a way // On Windows, the Microsoft toolchain does not provide a way
// to reliably remove all absolute paths from __FILE__ usage. // to reliably remove all absolute paths from __FILE__ usage.
// Until that is fixed, we simply exclude jvm.dll from this // Until that is fixed, we simply exclude *.dll from this
// test. // test.
} else if (fileName.endsWith(".zip")) { } else if (fileName.endsWith(".zip")) {
scanZipFile(file, searchPatterns); scanZipFile(file, searchPatterns);
@ -168,7 +168,7 @@ public class AbsPathsInImage {
private void scanFile(Path file, List<byte[]> searchPatterns) throws IOException { private void scanFile(Path file, List<byte[]> searchPatterns) throws IOException {
List<String> matches = scanBytes(Files.readAllBytes(file), searchPatterns); List<String> matches = scanBytes(Files.readAllBytes(file), searchPatterns);
// For the same reason as jvm.dll above, the jdk.incubator.jpackage module // For the same reason as the *.dll above, the jdk.incubator.jpackage module
// contains some unavoidable header references in the launcher which is // contains some unavoidable header references in the launcher which is
// stored as a java resource inside the modules file. // stored as a java resource inside the modules file.
if (IS_WINDOWS && file.toString().endsWith("modules")) { if (IS_WINDOWS && file.toString().endsWith("modules")) {