db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r965647 - in /db/derby/code/trunk/java: drda/org/apache/derby/drda/ engine/org/apache/derby/impl/store/raw/data/ testing/org/apache/derbyTesting/functionTests/tests/derbynet/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ test...
Date Mon, 19 Jul 2010 21:36:57 GMT
Author: kmarsden
Date: Mon Jul 19 21:36:57 2010
New Revision: 965647

URL: http://svn.apache.org/viewvc?rev=965647&view=rev
Log:
DERBY-4715 Write jvm information and path of derby.jar to derby.log

Contributed by Lily Wei (lily wei at yahoo dot com)


Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy
    db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetworkServerControlApiTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LDAPTests.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.initial.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.modified.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.unreloadable.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/nwsvr.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/server.policy Mon Jul 19 21:36:57
2010
@@ -89,6 +89,9 @@ grant codeBase "${derby.install.url}derb
   permission org.apache.derby.security.SystemPermission "engine", "monitor";
   permission org.apache.derby.security.SystemPermission "server", "monitor";
 
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
 grant codeBase "${derby.install.url}derbynet.jar"

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/template.policy Mon Jul 19 21:36:57
2010
@@ -76,6 +76,10 @@ grant codeBase "${derby.install.url}derb
 //
   permission javax.management.MBeanTrustPermission "register";
 
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
 };
 
 grant codeBase "${derby.install.url}derbynet.jar"

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Mon Jul 19 21:36:57 2010
@@ -91,8 +91,13 @@ import java.util.Enumeration;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+import java.net.URL;
+import java.net.URLDecoder;
 
 import java.security.AccessController;
+import java.security.CodeSource;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedExceptionAction;
 import java.security.PrivilegedActionException;
@@ -137,6 +142,10 @@ public class BaseDataFileFactory
 	private     LogFactory	    logFactory;
 
 	private     ProductVersionHolder jbmsVersion;
+	
+	private     String          jvmVersion;
+	
+	private     String          jarCPath;
 
 	private     RawStoreFactory	rawStoreFactory; // associated raw store factory
 
@@ -261,6 +270,10 @@ public class BaseDataFileFactory
     {
 
 		jbmsVersion = Monitor.getMonitor().getEngineVersion();
+		
+		jvmVersion = buildJvmVersion();
+		
+		jarCPath = jarClassPath(getClass());
 
 		dataDirectory = startParams.getProperty(PersistentService.ROOT);
 
@@ -360,9 +373,10 @@ public class BaseDataFileFactory
 			   MessageService.getTextMessage(MessageId.STORE_BOOT_MSG,
                                              jbmsVersion,
                                              identifier,
-                                             dataDirectory + " " + readOnlyMsg,
                                              // cast to Object so we get object hash code
-                                             (Object) this.getClass().getClassLoader()
+                                             (Object) this.getClass().getClassLoader(),
+                                             dataDirectory + " " + readOnlyMsg 
+                                             +"\nLoaded from " + jarCPath + "\n" +jvmVersion
                                              ));
 
         if (logBootTrace)
@@ -2144,8 +2158,70 @@ public class BaseDataFileFactory
         containerEncrypter.removeOldVersionOfContainers(inRecovery);
         containerEncrypter = null;
     }
-
-
+ 
+    
+    /**
+     * Return a jar file by asking the class's 
+     * class loader for the location where the class was loaded from. 
+     * If no value, it returns null
+     * @param cls the Class to ask to print the class name of an object
+     *
+     * @return the ClassPath of a jar file
+     **/
+    private static String jarClassPath(final Class cls)
+    {
+        return (String)AccessController.doPrivileged( new PrivilegedAction()
+        {
+          public Object run()
+          {
+              CodeSource cs = null;
+              try {
+                  cs = cls.getProtectionDomain().getCodeSource();
+              }
+              catch (SecurityException se) {
+                  return se.getMessage();
+              }
+  
+              if ( cs == null )
+                  return null;        
+      
+              URL result = cs.getLocation ();
+      
+              return result.toString();
+          }
+        });
+    }
+    
+    
+    /**
+     * Return values of system properties that identify the JVM. 
+     * Will catch SecurityExceptions and note them for displaying information.
+     * @return the Java system property value from the JVM or a string capturing a
+     * security exception.
+     */
+    private static String buildJvmVersion () {
+        return (String)AccessController.doPrivileged( new PrivilegedAction()
+        {
+           public Object run()
+           {      
+             String jvmversion = "";
+             try {
+                 String currentProp  = PropertyUtil.getSystemProperty("java.vendor");
+                 if ( currentProp != null)
+                     jvmversion = "java.vendor=" + currentProp;
+                 if ((currentProp = PropertyUtil.getSystemProperty("java.runtime.version"))
!= null)
+                     jvmversion += "\njava.runtime.version=" + currentProp;
+                 if ((currentProp = PropertyUtil.getSystemProperty("java.fullversion")) !=
null)
+                     jvmversion += "\njava.fullversion=" + currentProp ;         
+              }
+              catch (SecurityException se) {
+                   return se.getMessage();
+              }
+              return jvmversion;
+            }
+        });
+    } // end of buildjvmVersion
+        
 	/**
 		Returns the encryption block size used by the algorithm at time of
 		creation of an encrypted database

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy
Mon Jul 19 21:36:57 2010
@@ -59,6 +59,10 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.security.SecurityPermission "getPolicy";
   
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
   permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
   permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
   // [DERBY-2000] The write permission was added to allow creation of the

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetworkServerControlApiTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetworkServerControlApiTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetworkServerControlApiTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetworkServerControlApiTest.policy
Mon Jul 19 21:36:57 2010
@@ -59,6 +59,10 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.security.SecurityPermission "getPolicy";
   
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
   permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
   permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
   // [DERBY-2000] The write permission was added to allow creation of the

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy
Mon Jul 19 21:36:57 2010
@@ -62,6 +62,10 @@ permission java.util.PropertyPermission 
 
   permission java.lang.RuntimePermission "createClassLoader";
 
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
   // permissions so that we can set the context class loader to
   // null for daemon threads to avoid class loader leak.
   // DERBY-3745

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.policy
Mon Jul 19 21:36:57 2010
@@ -58,6 +58,10 @@ grant codeBase "${derbyTesting.codejar}d
 
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.security.SecurityPermission "getPolicy";
+
+  // getProectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
   
   permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
   permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.policy
Mon Jul 19 21:36:57 2010
@@ -61,6 +61,10 @@ grant codeBase "${derbyTesting.codejar}d
 
   permission java.lang.RuntimePermission "createClassLoader";
 
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
   // permissions so that we can set the context class loader to
   // null for daemon threads to avoid class loader leak.
   // DERBY-3745

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LDAPTests.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LDAPTests.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LDAPTests.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LDAPTests.policy
Mon Jul 19 21:36:57 2010
@@ -49,7 +49,7 @@
 //
 grant codeBase "${derbyTesting.codejar}derby.jar" {
   permission java.util.PropertyPermission "derby.*", "read";
-permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
+  permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
       "write"; 
   permission java.util.PropertyPermission "java.class.path", "read";//sysinfo
   permission java.util.PropertyPermission "java.runtime.version", "read";//sysinfo
@@ -62,6 +62,10 @@ permission java.util.PropertyPermission 
   permission java.lang.RuntimePermission "createClassLoader";
   permission java.security.SecurityPermission "getPolicy";
   
+  // getProtectionDomain is an optional permission needed for printing classpath 
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+  
   permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
   permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
   // [DERBY-2000] The write permission was added to allow creation of the

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.initial.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.initial.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.initial.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.initial.policy
Mon Jul 19 21:36:57 2010
@@ -30,6 +30,9 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.io.FilePermission "${derby.system.home}","read";
   permission java.io.FilePermission "${derby.system.home}${/}-", "read,write,delete";
 
+// getProtectionDomain is an optional permission needed for printing classpath information
+// to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
 //
 // This permission lets a DBA reload this policy file while the server
 // is still running.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.modified.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.modified.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.modified.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.modified.policy
Mon Jul 19 21:36:57 2010
@@ -30,6 +30,9 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.io.FilePermission "${derby.system.home}","read";
   permission java.io.FilePermission "${derby.system.home}${/}-", "read,write,delete";
 
+// getProtectionDomain is an optional permission needed for printing classpath
+// information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
 //
 // This permission lets a DBA reload this policy file while the server
 // is still running.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.unreloadable.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.unreloadable.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.unreloadable.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SecurityPolicyReloadingTest.unreloadable.policy
Mon Jul 19 21:36:57 2010
@@ -58,6 +58,10 @@ permission java.util.PropertyPermission 
 
   permission java.lang.RuntimePermission "createClassLoader";
 
+  // getProtectionDomain is an optional permission needed for printing classpath 
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
   //
   // This permission deliberately omitted.
   //

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy
Mon Jul 19 21:36:57 2010
@@ -1,5 +1,5 @@
 //
-// *  Derby - Class org.apache.derbyTesting.functionTests.tests.lang.SimpleTest
+// *  Derby - Class org.apache.derbyTesting.functionTests.tests.unit.fillLog.policy
 // *  
 // * Licensed to the Apache Software Foundation (ASF) under one
 // * or more contributor license agreements.  See the NOTICE file

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
Mon Jul 19 21:36:57 2010
@@ -47,7 +47,7 @@
 //
 grant codeBase "${derbyTesting.codejar}derby.jar" {
   permission java.util.PropertyPermission "derby.*", "read";
-permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
+  permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
       "write"; 
   // The next two properties are used to determine if the VM is 32 or 64 bit.
   permission java.util.PropertyPermission "sun.arch.data.model", "read";
@@ -62,6 +62,10 @@ permission java.util.PropertyPermission 
 
   permission java.lang.RuntimePermission "createClassLoader";
 
+  // getProtectionDomain is an optional permission needed for printing classpath
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
+
   // permissions so that we can set the context class loader to
   // null for daemon threads to avoid class loader leak.
   // DERBY-3745

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/nwsvr.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/nwsvr.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/nwsvr.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/nwsvr.policy
Mon Jul 19 21:36:57 2010
@@ -32,6 +32,10 @@ permission java.util.PropertyPermission 
 
 permission java.lang.RuntimePermission "createClassLoader";
 
+// getProectionDomain is an optional permission needed to printing classpath 
+// information to derby.log
+permission java.lang.RuntimePermission "getProtectionDomain";
+
 // These permissions are needed to load the JCE for encryption with JDK131.
 // JDK14 has the JCE  preloaded
 permission java.security.SecurityPermission "createAccessControlContext";

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy
Mon Jul 19 21:36:57 2010
@@ -97,6 +97,10 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.lang.RuntimePermission "getStackTrace";
   permission java.lang.RuntimePermission "modifyThreadGroup";
 //-----------------------------------------------------------------------------
+
+// getProtectionDomain is an optional permission needed for printing classpath 
+// information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy
Mon Jul 19 21:36:57 2010
@@ -99,6 +99,10 @@ grant codeBase "${derbyTesting.codejar}d
   // Because this unit test involves some relative and absolute sample paths,
   // we liberally grant read access to all files.
   permission java.io.FilePermission "<<ALL FILES>>", "read";
+  
+  // getProtectionDomain is an optional permission needed for printing classpath 
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
 //

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy?rev=965647&r1=965646&r2=965647&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy
Mon Jul 19 21:36:57 2010
@@ -79,6 +79,10 @@ grant codeBase "${derbyTesting.codejar}d
   // Because this unit test involves some relative and absolute sample paths,
   // we liberally grant read access to all files.
   permission java.io.FilePermission "<<ALL FILES>>", "read";
+
+  // getProtectionDomain is an optional permission needed for printing classpath 
+  // information to derby.log
+  permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
 //



Mime
View raw message