8170602: Startup regression due to introduction of lambda in java.io.FilePermissionCollection
authorredestad
Thu, 01 Dec 2016 19:03:11 +0100
changeset 42343 58076b66ffdb
parent 42342 63783438fd88
child 42344 a2378998a8fd
8170602: Startup regression due to introduction of lambda in java.io.FilePermissionCollection Reviewed-by: rriggs, alanb
jdk/src/java.base/share/classes/java/io/FilePermission.java
--- a/jdk/src/java.base/share/classes/java/io/FilePermission.java	Thu Dec 01 06:54:01 2016 -0800
+++ b/jdk/src/java.base/share/classes/java/io/FilePermission.java	Thu Dec 01 19:03:11 2016 +0100
@@ -1077,7 +1077,10 @@
         // 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 @@
                     }
                     return existingVal;
                 }
+            }
         );
     }