db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r400366 - in /db/derby/code/trunk/java: testing/org/apache/derbyTesting/functionTests/tests/derbynet/ tools/org/apache/derby/impl/tools/sysinfo/ tools/org/apache/derby/loc/
Date Sat, 06 May 2006 20:37:19 GMT
Author: bpendleton
Date: Sat May  6 13:37:17 2006
New Revision: 400366

URL: http://svn.apache.org/viewcvs?rev=400366&view=rev
Log:
DERBY-1229: sysinfo and sysinfo_withProperties tests fail with SecurityException

This change modifies the handling of security exceptions in the Sysinfo tool.
If a security exception occurs while processing an element in the classpath,
sysinfo will now format that security exception's message into the output,
and then will continue on to process the other elements in the classpath.

This ensures that sysinfo provides more detailed and more complete information
about the classpath information in the environment.

Also, the sed properties for the sysinfo tests are now updated to mask out
the getProtectionDomain security exception, since that is an expected
exception in these tests (in fact, there are many expected security exceptions
in these tests).


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_sed.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties_sed.properties
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_de_DE.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_es.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_fr.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_it.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ja_JP.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ko_KR.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_pt_BR.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_CN.properties
    db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_TW.properties

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_sed.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_sed.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_sed.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_sed.properties
Sat May  6 13:37:17 2006
@@ -1 +1 @@
-delete=Version,version,Java,OS,[0-9*].[0-9*].[0-9*],JRE - JDBC,traceDirectory
+delete=Version,version,Java,OS,[0-9*].[0-9*].[0-9*],JRE - JDBC,traceDirectory,Unable to access
Protection Domain

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties_sed.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties_sed.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties_sed.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties_sed.properties
Sat May  6 13:37:17 2006
@@ -1 +1 @@
-delete=Version,version,Java,OS,[0-9*].[0-9*].[0-9*],JRE - JDBC,traceDirectory
+delete=Version,version,Java,OS,[0-9*].[0-9*].[0-9*],JRE - JDBC,traceDirectory,Unable to access
Protection Domain

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java Sat May 
6 13:37:17 2006
@@ -753,7 +753,16 @@
 				Vector v = new Vector();
 				for (int i = 0; i < cp.length; i++)
 				{
-					ZipInfoProperties zip = checkForInfo(cp[i]);
+					ZipInfoProperties zip = null;
+					try {
+						zip = checkForInfo(cp[i]);
+					}
+					catch (SecurityException se)
+					{
+						zip = new ZipInfoProperties(null);
+						zip.setLocation(
+							Main.getTextMessage ("SIF03.C", se.getMessage()));
+					}
 					if (zip != null)
 					{
 						v.addElement(zip);
@@ -773,7 +782,8 @@
         {
             ZipInfoProperties zip[] = new ZipInfoProperties[1];
             zip[0] = new ZipInfoProperties(null);
-            zip[0].setLocation (Main.getTextMessage ("SIF03.C"));
+            zip[0].setLocation(
+					Main.getTextMessage ("SIF03.C", se.getMessage()));
             return zip;
         }
     }

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages.properties Sat May
 6 13:37:17 2006
@@ -38,7 +38,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Java Security Exception.
+SIF03.C=Java Security Exception: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<null>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_de_DE.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_de_DE.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_de_DE.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_de_DE.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Java-Sicherheitsausnahme.
+SIF03.C=Java-Sicherheitsausnahme: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<null>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_es.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_es.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_es.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_es.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Excepci\u00f3n de seguridad de Java.
+SIF03.C=Excepci\u00f3n de seguridad de Java: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<nulo>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_fr.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_fr.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_fr.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_fr.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Exception de s\u00e9curit\u00e9 Java.
+SIF03.C=Exception de s\u00e9curit\u00e9 Java: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<nul>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_it.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_it.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_it.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_it.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Eccezione di sicurezza Java.
+SIF03.C=Eccezione di sicurezza Java: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<nullo>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ja_JP.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ja_JP.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ja_JP.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ja_JP.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Java \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u4f8b\u5916\u3067\u3059\u3002
+SIF03.C=Java \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u4f8b\u5916\u3067\u3059\u3002: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<null>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ko_KR.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ko_KR.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ko_KR.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_ko_KR.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Java \ubcf4\uc548 \uc608\uc678.
+SIF03.C=Java \ubcf4\uc548 \uc608\uc678: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<\ub110>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_pt_BR.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_pt_BR.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_pt_BR.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_pt_BR.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Exce\u00e7\u00e3o de Seguran\u00e7a Java.
+SIF03.C=Exce\u00e7\u00e3o de Seguran\u00e7a Java: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<null>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_CN.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_CN.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_CN.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_CN.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Java \u5b89\u5168\u6027\u5f02\u5e38\u3002
+SIF03.C=Java \u5b89\u5168\u6027\u5f02\u5e38\u3002: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<null>

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_TW.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_TW.properties?rev=400366&r1=400365&r2=400366&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_TW.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/sysinfoMessages_zh_TW.properties Sat
May  6 13:37:17 2006
@@ -36,7 +36,7 @@
 
 
 # ZipInfo messages are SIF03.*
-SIF03.C=Java \u5b89\u5168\u7570\u5e38\u72c0\u6cc1\u3002
+SIF03.C=Java \u5b89\u5168\u7570\u5e38\u72c0\u6cc1\u3002: {0}
 
 # ZipInfoProperties messages are SIF04.*
 SIF04.C=<null>



Mime
View raw message