diff options
author | Sven Gothel <[email protected]> | 2014-09-08 05:09:02 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-08 05:09:02 +0200 |
commit | dde91a061cb0bc209442fe0e74a532b91d1bb4b8 (patch) | |
tree | 9c046c2d5deb74cb45296cbd400c56cf0a2c60fd /src/junit/com/jogamp/common/net/URIDumpUtil.java | |
parent | 6322991799268166e46aeeacb142c11d45950f48 (diff) |
Bug 1063: Complete Uri impl. and adoption throughout GlueGen
- Uri:
- Add error correction (fix) of path at ctor
in case a a contained Uri is requested from an opaque one.
The latter might come from URI/URL and is not properly encoded!
See Uri.PARSE_HINT_FIX_PATH
- Simplify conversion methods:
- valueOf(URI/URL): Re-encode only if not opaque
- getNativeFilePath() -> toFile()
- Move IOUtil Uri related constants to class Uri
- Add DEBUG and DEBUG_SHOWFIX
- Complete adoption of URI -> Uri changes
- IOUtil, JarUtil and TempJarCache still holds some
left over deprecated methods, which will be removed
after officially starting 2.3.0 (JOGL dependencies)
- Otherwise not URI utilization left
- Tests
- Cleaned ip TestUri01 and TestUri03Resolving
- TestUri03Resolving also tests URL -> Uri,
and hence mentioned Uri.PARSE_HINT_FIX_PATH
Diffstat (limited to 'src/junit/com/jogamp/common/net/URIDumpUtil.java')
-rw-r--r-- | src/junit/com/jogamp/common/net/URIDumpUtil.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/junit/com/jogamp/common/net/URIDumpUtil.java b/src/junit/com/jogamp/common/net/URIDumpUtil.java index a7d050a..c5ba51f 100644 --- a/src/junit/com/jogamp/common/net/URIDumpUtil.java +++ b/src/junit/com/jogamp/common/net/URIDumpUtil.java @@ -52,7 +52,7 @@ public class URIDumpUtil { System.err.println("0.0.0 string: "+uri.toString()); System.err.println("0.0.0 ascii : "+uri.toASCIIString()); - System.err.println("0.0.0 native-file: "+uri.getNativeFilePath()); + System.err.println("0.0.0 native-file: "+uri.toFile()); System.err.println("0.0.0 contained: "+uri.getContainedUri()); System.err.println("1.0.0 scheme: "+uri.scheme); @@ -73,7 +73,7 @@ public class URIDumpUtil { * @throws URISyntaxException */ public static void showReencodedURIOfUri(final Uri uri) throws URISyntaxException { - final URI recomposedURI = uri.toURI(true); + final URI recomposedURI = uri.toURIReencoded(); showURI("YYYYYY Recomposed URI "+recomposedURI+", isOpaque "+recomposedURI.isOpaque()+", isAbs "+recomposedURI.isAbsolute(), recomposedURI); final String recomposedURIStr = recomposedURI.toString(); final boolean equalsRecompURI = uri.input.equals(recomposedURIStr); @@ -88,7 +88,7 @@ public class URIDumpUtil { * @throws URISyntaxException */ public static void showReencodedUriOfURI(final URI uri) throws URISyntaxException { - final Uri recomposedUri = Uri.valueOf(uri, true); + final Uri recomposedUri = Uri.valueOf(uri); showUri("ZZZZZZ Recomposed Uri "+recomposedUri+", isOpaque "+recomposedUri.opaque+", isAbs "+recomposedUri.absolute+", hasAuth "+recomposedUri.hasAuthority, recomposedUri); final String recomposedUriStr = recomposedUri.toString(); final boolean equalsRecompUri = uri.toString().equals(recomposedUriStr); |