test/jdk/java/lang/invoke/MethodHandleConstants.java
changeset 55462 6dfdcd31463d
parent 47216 71c04702a3d5
--- a/test/jdk/java/lang/invoke/MethodHandleConstants.java	Fri Jun 21 08:38:26 2019 -0400
+++ b/test/jdk/java/lang/invoke/MethodHandleConstants.java	Fri Jun 21 13:04:14 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -169,6 +169,8 @@
     }
 
     static class TestPolicy extends Policy {
+        static final Policy DEFAULT_POLICY = Policy.getPolicy();
+
         final PermissionCollection permissions = new Permissions();
         TestPolicy() {
             permissions.add(new java.io.FilePermission("<<ALL FILES>>", "read"));
@@ -182,7 +184,7 @@
         }
 
         public boolean implies(ProtectionDomain domain, Permission perm) {
-            return permissions.implies(perm);
+            return permissions.implies(perm) || DEFAULT_POLICY.implies(domain, perm);
         }
     }
 }