8170408: LogGeneratedClassesTest.java fails with recent changes
Reviewed-by: dfuchs
--- a/jdk/src/java.base/share/classes/java/io/FilePermission.java Tue Nov 29 13:58:00 2016 -0500
+++ b/jdk/src/java.base/share/classes/java/io/FilePermission.java Wed Nov 30 08:02:39 2016 +0800
@@ -1075,8 +1075,7 @@
FilePermission fp = (FilePermission)permission;
// Add permission to map if it is absent, or replace with new
- // permission if applicable. NOTE: cannot use lambda for
- // remappingFunction parameter until JDK-8076596 is fixed.
+ // permission if applicable.
perms.merge(fp.getName(), fp,
(existingVal, newVal) -> {
int oldMask = ((FilePermission)existingVal).getMask();
--- a/jdk/test/ProblemList.txt Tue Nov 29 13:58:00 2016 -0500
+++ b/jdk/test/ProblemList.txt Wed Nov 30 08:02:39 2016 +0800
@@ -125,8 +125,6 @@
java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all
-java/lang/invoke/lambda/LogGeneratedClassesTest.java 8170408 generic-all
-
############################################################################
# jdk_instrument
--- a/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java Tue Nov 29 13:58:00 2016 -0500
+++ b/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java Wed Nov 30 08:02:39 2016 +0800
@@ -127,8 +127,13 @@
"-Djdk.internal.lambda.dumpProxyClasses=dump",
"-Djava.security.manager",
"com.example.TestLambda");
- // dump/com/example + 2 class files
- assertEquals(Files.walk(Paths.get("dump")).count(), 5, "Two lambda captured");
+ // 2 our own class files. We don't care about the others
+ assertEquals(Files.find(
+ Paths.get("dump"),
+ 99,
+ (p, a) -> p.startsWith(Paths.get("dump/com/example"))
+ && a.isRegularFile()).count(),
+ 2, "Two lambda captured");
tr.assertZero("Should still return 0");
}