From 026875dd5256051d4e3504f1d9b01f7ce2bb70ff Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 3 Oct 2015 11:44:02 +0200 Subject: Bug 1243 - Fix IOUtil.cleanPathString(..) special case ; Allow IOUtil and Uri to handle relative path Fix IOUtil.cleanPathString(..) special case: Special case '/a/./../b' -> '/b' requires to resolve './' before '../'. Allow IOUtil and Uri to handle relative path: - IOUtil.getParentOf(..) - IOUtil.cleanPathString(..) Handle cases: 'a/./../b' -> 'b' '.././b' -> '../b' - Uri: Handle null scheme --- src/java/com/jogamp/common/util/JarUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/java/com/jogamp/common/util/JarUtil.java') diff --git a/src/java/com/jogamp/common/util/JarUtil.java b/src/java/com/jogamp/common/util/JarUtil.java index 745dd12..2580714 100644 --- a/src/java/com/jogamp/common/util/JarUtil.java +++ b/src/java/com/jogamp/common/util/JarUtil.java @@ -163,7 +163,7 @@ public class JarUtil { } } } - if( !uri.scheme.equals( Uri.JAR_SCHEME ) ) { + if( !uri.isJarScheme() ) { throw new IllegalArgumentException("Uri is not using scheme "+Uri.JAR_SCHEME+": <"+uri+">"); } if(DEBUG) { @@ -190,7 +190,7 @@ public class JarUtil { if(null == classJarUri) { throw new IllegalArgumentException("Uri is null"); } - if( !classJarUri.scheme.equals(Uri.JAR_SCHEME) ) { + if( !classJarUri.isJarScheme() ) { throw new IllegalArgumentException("Uri is not using scheme "+Uri.JAR_SCHEME+": <"+classJarUri+">"); } Uri.Encoded ssp = classJarUri.schemeSpecificPart; @@ -262,7 +262,7 @@ public class JarUtil { if(null == classJarUri) { throw new IllegalArgumentException("Uri is null"); } - if( !classJarUri.scheme.equals(Uri.JAR_SCHEME) ) { + if( !classJarUri.isJarScheme() ) { throw new IllegalArgumentException("Uri is not a using scheme "+Uri.JAR_SCHEME+": <"+classJarUri+">"); } final Uri.Encoded uriSSP = classJarUri.schemeSpecificPart; -- cgit v1.2.3