[Arakhnę-Dev] [387] * Manual building of the URL in toJarURL before using the URL class to create an instance .

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 387
Author:   galland
Date:     2013-01-14 16:11:56 +0100 (Mon, 14 Jan 2013)
Log Message:
-----------
* Manual building of the URL in toJarURL before using the URL class to create an instance.

Modified Paths:
--------------
    trunk/arakhneVmutils/arakhneVmutils-java/src/main/java/org/arakhne/vmutil/FileSystem.java

Modified: trunk/arakhneVmutils/arakhneVmutils-java/src/main/java/org/arakhne/vmutil/FileSystem.java
===================================================================
--- trunk/arakhneVmutils/arakhneVmutils-java/src/main/java/org/arakhne/vmutil/FileSystem.java	2013-01-14 14:36:57 UTC (rev 386)
+++ trunk/arakhneVmutils/arakhneVmutils-java/src/main/java/org/arakhne/vmutil/FileSystem.java	2013-01-14 15:11:56 UTC (rev 387)
@@ -276,6 +276,7 @@
 	public static URL toJarURL(URL jarFile, String insideFile) throws MalformedURLException {
 		if (jarFile==null || insideFile==null) return null;
 		StringBuilder buf = new StringBuilder();
+		buf.append("jar:"); //$NON-NLS-1$
 		buf.append(jarFile.toExternalForm());
 		buf.append(JAR_URL_FILE_ROOT);
 		String path = getFilePath(insideFile);
@@ -285,7 +286,7 @@
 		else {
 			buf.append(path);
 		}
-		return new URL(URISchemeType.JAR.name(), "", buf.toString()); //$NON-NLS-1$
+		return new URL(buf.toString());
 	}
 
 	/** Replies if the current operating system uses case-sensitive filename.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/