harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r468005 - /incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java
Date Thu, 26 Oct 2006 14:09:43 GMT
Author: pyang
Date: Thu Oct 26 07:09:42 2006
New Revision: 468005

URL: http://svn.apache.org/viewvc?view=rev&rev=468005
Log:
Apply patch for HARMONY-1963([classlib][security] Harmony cannot read security policy file
correctly)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java?view=diff&rev=468005&r1=468004&r2=468005
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java
Thu Oct 26 07:09:42 2006
@@ -25,6 +25,7 @@
 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.File;
 import java.io.Reader;
 import java.net.URL;
 import java.security.cert.Certificate;
@@ -193,6 +194,11 @@
         if (ge.codebase != null) {
             codebase = new URL(resolve ? PolicyUtils.expandURL(ge.codebase,
                     system) : ge.codebase);
+            //Fix HARMONY-1963
+            if ("file".equals(codebase.getProtocol())) { //$NON-NLS-1$
+                codebase = new URL("file:/" +  //$NON-NLS-1$
+                        new File(codebase.getFile()).getCanonicalPath());
+            }
         }
         if (ge.signers != null) {
             if (resolve) {



Mime
View raw message