Merge branch 'release/5.34.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.cdmlib / src / main / java / eu / etaxonomy / cdm / api / application / CdmApplicationState.java
index 8dcb934156ea4c1d83d4446ce1a3bcbaa7d85d94..b8754d1cf69b3679983fd05926b5963bb4ed561a 100644 (file)
@@ -13,7 +13,7 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
-import java.net.URI;
+import eu.etaxonomy.cdm.common.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Dictionary;
@@ -214,7 +214,8 @@ public class CdmApplicationState {
                     File file = null;
                     try {
                         String urlString = FileLocator.resolve(fileURL).toExternalForm().replace(" ", "%20");
-                        file = new File(new URI(urlString));
+                        
+                        file = new File(new URI(urlString).getJavaUri());
                         JarFile jarFile = new JarFile(file);
                         Manifest manifest = jarFile.getManifest();
                         Attributes attributes = manifest.getMainAttributes();
@@ -233,7 +234,10 @@ public class CdmApplicationState {
                         throw new IllegalStateException(urise);
                     } catch (IOException ioe) {
                         throw new IllegalStateException(ioe);
-                    }
+                    } catch (IllegalArgumentException iae) {
+                       String message = iae.getMessage().concat("uri" + jar);
+                       throw new IllegalStateException(message);
+                       }
                 }
             }
         } catch (BundleException e) {