db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r1691466 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NoDBInternalsPermissionTest.java
Date Fri, 17 Jul 2015 00:22:50 GMT
Author: bpendleton
Date: Fri Jul 17 00:22:50 2015
New Revision: 1691466

URL: http://svn.apache.org/r1691466
Log:
DERBY-6741: User code can get the ContextManager from an EmbedConnection

This change adjusts NoDBInternalsPermissionTest so that the try block in
test_002_EmbedConnection covers the getConnection() call. At least in my
particular configuration, the getConnection() call can raise the (expected)
AccessControlException due to this test's security policy.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NoDBInternalsPermissionTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NoDBInternalsPermissionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NoDBInternalsPermissionTest.java?rev=1691466&r1=1691465&r2=1691466&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NoDBInternalsPermissionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NoDBInternalsPermissionTest.java
Fri Jul 17 00:22:50 2015
@@ -135,8 +135,8 @@ public class NoDBInternalsPermissionTest
     public  void    test_002_EmbedConnection()
         throws Exception
     {
-        Connection  conn = getConnection();
         try {
+            Connection  conn = getConnection();
             ((EmbedConnection) conn).getContextManager();
             fail( "Should have raised an AccessControlException" );
         }



Mime
View raw message