8170602: Startup regression due to introduction of lambda in java.io.FilePermissionCollection

Reviewed-by: rriggs, alanb
This commit is contained in:
Claes Redestad 2016-12-01 19:03:11 +01:00
parent 1c3de25a5f
commit f7751b87cd

View File

@ -1077,7 +1077,10 @@ final class FilePermissionCollection extends PermissionCollection
// Add permission to map if it is absent, or replace with new
// permission if applicable.
perms.merge(fp.getName(), fp,
(existingVal, newVal) -> {
new java.util.function.BiFunction<>() {
@Override
public Permission apply(Permission existingVal,
Permission newVal) {
int oldMask = ((FilePermission)existingVal).getMask();
int newMask = ((FilePermission)newVal).getMask();
if (oldMask != newMask) {
@ -1092,6 +1095,7 @@ final class FilePermissionCollection extends PermissionCollection
}
return existingVal;
}
}
);
}