You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by pe...@apache.org on 2012/07/19 13:20:20 UTC

svn commit: r1363295 - in /river/jtsk/trunk: qa/src/com/sun/jini/test/spec/jeri/transport/ssl/SslServerConstructorAccessorTest.java src/org/apache/river/api/security/DefaultPolicyParser.java

Author: peter_firmstone
Date: Thu Jul 19 11:20:20 2012
New Revision: 1363295

URL: http://svn.apache.org/viewvc?rev=1363295&view=rev
Log:
Attempt to fix windows file URI issues.

Modified:
    river/jtsk/trunk/qa/src/com/sun/jini/test/spec/jeri/transport/ssl/SslServerConstructorAccessorTest.java
    river/jtsk/trunk/src/org/apache/river/api/security/DefaultPolicyParser.java

Modified: river/jtsk/trunk/qa/src/com/sun/jini/test/spec/jeri/transport/ssl/SslServerConstructorAccessorTest.java
URL: http://svn.apache.org/viewvc/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/jeri/transport/ssl/SslServerConstructorAccessorTest.java?rev=1363295&r1=1363294&r2=1363295&view=diff
==============================================================================
--- river/jtsk/trunk/qa/src/com/sun/jini/test/spec/jeri/transport/ssl/SslServerConstructorAccessorTest.java (original)
+++ river/jtsk/trunk/qa/src/com/sun/jini/test/spec/jeri/transport/ssl/SslServerConstructorAccessorTest.java Thu Jul 19 11:20:20 2012
@@ -258,7 +258,7 @@ public class SslServerConstructorAccesso
             exceptionThrown = true;
         }
         if (!exceptionThrown) {
-            throw new TestException("SecurityExceptioin was"
+            throw new TestException("SecurityException was"
                 + " not thrown when creating an instance with an"
                 + " unauthorized host");
         }

Modified: river/jtsk/trunk/src/org/apache/river/api/security/DefaultPolicyParser.java
URL: http://svn.apache.org/viewvc/river/jtsk/trunk/src/org/apache/river/api/security/DefaultPolicyParser.java?rev=1363295&r1=1363294&r2=1363295&view=diff
==============================================================================
--- river/jtsk/trunk/src/org/apache/river/api/security/DefaultPolicyParser.java (original)
+++ river/jtsk/trunk/src/org/apache/river/api/security/DefaultPolicyParser.java Thu Jul 19 11:20:20 2012
@@ -271,21 +271,22 @@ class DefaultPolicyParser implements Pol
         // We do this to support windows, this is to ensure that drive letter
         // capitalisation is correct and illegal strings are escaped correctly.
         String result = UriString.parse(uriString);
-        boolean isFile = result.startsWith("file:") || result.startsWith("FILE:");
+//        boolean isFile = result.startsWith("file:") || result.startsWith("FILE:");
         URI uri = new URI(result);
-        if (isFile){
-            if ( result.endsWith("*") || result.endsWith("-")){
-                // We did our best to create a compatible URI,
-                // upper and lower case may cause issues on windows, if the
-                // CodeSource url differs.
-                return uri; 
-            } else {
-                // Since file is system dependant, it will guarantee that
-                // the path is compatible and exists.
-                File file = new File(uri);
-                return file.toURI().normalize();
-            }
-        }
+        // Oddly enough, this next part didn't quite work out as expected.
+//        if (isFile){
+//            if ( result.endsWith("*") || result.endsWith("-")){
+//                // We did our best to create a compatible URI,
+//                // upper and lower case may cause issues on windows, if the
+//                // CodeSource url differs.
+//                return uri; 
+//            } else {
+//                // Since file is system dependant, it will guarantee that
+//                // the path is compatible and exists.
+//                File file = new File(uri);
+//                return file.toURI().normalize();
+//            }
+//        }
         return uri;
     }