geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r566785 - in /geronimo/server/branches/2.0/modules: geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/ geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/
Date Thu, 16 Aug 2007 17:24:28 GMT
Author: gawor
Date: Thu Aug 16 10:24:26 2007
New Revision: 566785

URL: http://svn.apache.org/viewvc?view=rev&rev=566785
Log:
espace spaces with %20 when creating a URI (GERONIMO-3324)

Modified:
    geronimo/server/branches/2.0/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
    geronimo/server/branches/2.0/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java

Modified: geronimo/server/branches/2.0/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?view=diff&rev=566785&r1=566784&r2=566785
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
Thu Aug 16 10:24:26 2007
@@ -216,7 +216,7 @@
                         location = location.substring(1);
                     }
                     try {
-                        File targetFile = webModule.getEarContext().getTargetFile(new URI(location));
+                        File targetFile = webModule.getEarContext().getTargetFile(createURI(location));
                         if (targetFile!=null) {
                             tldURLs.add(targetFile.toURL());
                         }
@@ -277,13 +277,13 @@
             while (entries.hasMoreElements()) {
                 JarEntry jarEntry = entries.nextElement();
                 if (jarEntry.getName().startsWith("WEB-INF/") && jarEntry.getName().endsWith(".tld"))
{
-                    File targetFile = webModule.getEarContext().getTargetFile(new URI(jarEntry.getName()));
+                    File targetFile = webModule.getEarContext().getTargetFile(createURI(jarEntry.getName()));
                     if (targetFile!=null) {
                         modURLs.add(targetFile.toURL());
                     }
                 }
                 if (jarEntry.getName().startsWith("WEB-INF/lib/") && jarEntry.getName().endsWith(".jar"))
{
-                    File targetFile = webModule.getEarContext().getTargetFile(new URI(jarEntry.getName()));
+                    File targetFile = webModule.getEarContext().getTargetFile(createURI(jarEntry.getName()));
                     List<URL> jarUrls = scanJAR(new JarFile(targetFile), null);
                     for (URL jarURL : jarUrls) {
                         modURLs.add(jarURL);
@@ -363,7 +363,7 @@
                 try {
                     JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
                     URL urlJC = jarConnection.getJarFileURL();
-                    URI baseURI = new URI(urlJC.toString().replaceAll(" ", "%20"));
+                    URI baseURI = createURI(urlJC.toString());
                     directory = new File(baseURI);
                     if (directory.isDirectory()) {
                         if (directory.canRead()) {
@@ -382,7 +382,7 @@
                 }
             } else if (url.toString().startsWith("file:")) {
                 try {
-                    URI baseURI = new URI(url.toString().replaceAll(" ", "%20"));
+                    URI baseURI = createURI(url.toString());
                     directory = new File(baseURI);
                     if (directory.isDirectory() && directory.canRead()) {
                         File[] children = directory.listFiles();
@@ -688,6 +688,11 @@
         return (TaglibDocument) xmlObject;
     }
 
+
+    private URI createURI(String path) throws URISyntaxException {
+        path = path.replaceAll(" ", "%20");
+        return new URI(path);
+    }
 
     public static final GBeanInfo GBEAN_INFO;
 

Modified: geronimo/server/branches/2.0/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java?view=diff&rev=566785&r1=566784&r2=566785
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Thu Aug 16 10:24:26 2007
@@ -115,6 +115,7 @@
             URL[] urls = new URL[manifestcp.size()];
             int i = 0;
             for (String path : manifestcp) {
+                path = path.replaceAll(" ", "%20");
                 URL url = moduleBaseURI.resolve(path).toURL();
                 urls[i++] = url;
             }



Mime
View raw message