[armedbear-cvs] r12689 - trunk/abcl/src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Sun May 16 09:09:46 UTC 2010


Author: mevenson
Date: Sun May 16 05:09:43 2010
New Revision: 12689

Log:
Thunk through URL.toURI() for getting URL authority.

Fixes loading from OSGi context with 'bundleresource:' for which the
java.net.URL object is incorrectly returning 'SECURITY_CHECKED' from
getAuthority().



Modified:
   trunk/abcl/src/org/armedbear/lisp/Pathname.java

Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java	Sun May 16 05:09:43 2010
@@ -355,7 +355,16 @@
                 return;
             }
             Debug.assertTrue(scheme != null);
-            String authority = url.getAuthority();
+      //      String authority = url.getAuthority();
+            URI uri = null;
+            try { 
+                uri = url.toURI().normalize();
+            } catch (URISyntaxException e) {
+                error(new LispError("Could not URI escape characters in "
+                                    + "'" + url + "'"
+                                    + " because: " + e));
+            }
+            String authority = uri.getAuthority();
             Debug.assertTrue(authority != null);
 
             host = NIL;
@@ -367,15 +376,6 @@
             device = NIL;
             
             // URI encode necessary characters
-            URI uri = null;
-            try { 
-                uri = url.toURI().normalize();
-            } catch (URISyntaxException e) {
-                error(new LispError("Could not URI escape characters in "
-                                    + "'" + url + "'"
-                                    + " because: " + e));
-            }
-
             String path = uri.getRawPath();
             if (path == null) {
                 path = "";




More information about the armedbear-cvs mailing list