8170408: LogGeneratedClassesTest.java fails with recent changes

Reviewed-by: dfuchs
This commit is contained in:
Weijun Wang 2016-11-30 08:02:39 +08:00
parent 40644c5ab9
commit d036a1e276
3 changed files with 8 additions and 6 deletions

View File

@ -1075,8 +1075,7 @@ final class FilePermissionCollection extends PermissionCollection
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();

View File

@ -125,8 +125,6 @@ java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java 8132565 gen
java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all
java/lang/invoke/lambda/LogGeneratedClassesTest.java 8170408 generic-all
############################################################################
# jdk_instrument

View File

@ -127,8 +127,13 @@ public class LogGeneratedClassesTest extends LUtils {
"-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");
}