< prev index next >

src/java.base/share/classes/java/io/FilePermission.java

Print this page
rev 16179 : 8170602: Startup regression due to introduction of lambda in java.io.FilePermissionCollection
Reviewed-by: TBD

*** 1075,1085 **** FilePermission fp = (FilePermission)permission; // Add permission to map if it is absent, or replace with new // permission if applicable. perms.merge(fp.getName(), fp, ! (existingVal, newVal) -> { int oldMask = ((FilePermission)existingVal).getMask(); int newMask = ((FilePermission)newVal).getMask(); if (oldMask != newMask) { int effective = oldMask | newMask; if (effective == newMask) { --- 1075,1088 ---- FilePermission fp = (FilePermission)permission; // Add permission to map if it is absent, or replace with new // permission if applicable. perms.merge(fp.getName(), fp, ! 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) { int effective = oldMask | newMask; if (effective == newMask) {
*** 1090,1099 **** --- 1093,1103 ---- .withNewActions(effective); } } return existingVal; } + } ); } /** * Check and see if this set of permissions implies the permissions
< prev index next >