river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject svn commit: r1716294 - in /river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider: dynamicPolicyProvider/NullCases.java policyFileProvider/NullCases.java
Date Wed, 25 Nov 2015 03:44:21 GMT
Author: gtrasuk
Date: Wed Nov 25 03:44:21 2015
New Revision: 1716294

URL: http://svn.apache.org/viewvc?rev=1716294&view=rev
Log:

        The tests below check that if you call getPermissions(codesource) 
        with a null codesource, a NullPointerException should be thrown.  The
        implementation of it relies not with DynamicPolicyProvider or PolicyFileProvider,
but with the
        underlying Policy object (java.security.Policy), which used to do just 
        that.
        
        However, this behaviour was reported as a bug in JDK-7147830 
        (2012-02-22), and resolved only in JDK8, as of 2012-07-17.
        So it's no longer appropriate to do this test.  Commented out for now,
        remove it completely if you happen to see this far in the future.


Modified:
    river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/NullCases.java
    river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/policyFileProvider/NullCases.java

Modified: river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/NullCases.java
URL: http://svn.apache.org/viewvc/river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/NullCases.java?rev=1716294&r1=1716293&r2=1716294&view=diff
==============================================================================
--- river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/NullCases.java
(original)
+++ river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/NullCases.java
Wed Nov 25 03:44:21 2015
@@ -204,10 +204,22 @@ public class NullCases extends DynamicPo
         msg = "policy.getPermissions((ProtectionDomain) null)";
         callGetPermissions((ProtectionDomain) null, pmGranted, msg);
 
+        /* (Greg Trasuk - 20151124)
+        The test below checks that if you call getPermissions(codesource) 
+        with a null codesource, a NullPointerException should be thrown.  The
+        implementation of it relies not with DynamicPolicyProvider but with the
+        underlying Policy object (java.security.Policy), which used to do just 
+        that.
+        
+        However, this behaviour was reported as a bug in JDK-7147830 
+        (2012-02-22), and resolved in in JDK8, as of 2012-07-17.
+        So it's no longer appropriate to do this test.  Commented out for now,
+        remove it completely if you happen to see this far in the future.
+        */
         // Call getPermissions() passing null as CodeSource
         // and verify that NullPointerException is thrown;
-        msg = "policy.getPermissions((CodeSource) null)";
-        callGetPermissionsNPE((CodeSource) null, msg);
+        //msg = "policy.getPermissions((CodeSource) null)";
+        //callGetPermissionsNPE((CodeSource) null, msg);
 
         // Call policy.implies(null, null)
         // and verify that NullPointerException is thrown;

Modified: river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/policyFileProvider/NullCases.java
URL: http://svn.apache.org/viewvc/river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/policyFileProvider/NullCases.java?rev=1716294&r1=1716293&r2=1716294&view=diff
==============================================================================
--- river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/policyFileProvider/NullCases.java
(original)
+++ river/jtsk/branches/2.2/qa/src/com/sun/jini/test/spec/policyprovider/policyFileProvider/NullCases.java
Wed Nov 25 03:44:21 2015
@@ -112,12 +112,24 @@ public class NullCases extends PolicyFil
          */
         callGetPermissionsNPD();
 
+        /* (Greg Trasuk - 20151124)
+        The test below checks that if you call getPermissions(codesource) 
+        with a null codesource, a NullPointerException should be thrown.  The
+        implementation of it relies not with DynamicPolicyProvider but with the
+        underlying Policy object (java.security.Policy), which used to do just 
+        that.
+        
+        However, this behaviour was reported as a bug in JDK-7147830 
+        (2012-02-22), and resolved in in JDK8, as of 2012-07-17.
+        So it's no longer appropriate to do this test.  Commented out for now,
+        remove it completely if you happen to see this far in the future.
+        */
         /*
          * Call getPermissions() passing null as CodeSource
          * and verify that NullPointerException is thrown;
          */
-        msg = "policy.getPermissions((CodeSource) null)";
-        callGetPermissionsNPE((CodeSource) null, msg);
+        //msg = "policy.getPermissions((CodeSource) null)";
+        //callGetPermissionsNPE((CodeSource) null, msg);
 
         /*
          * Call policy.implies(null, null)



Mime
View raw message