summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/net/TestUri02Composing.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-10 07:21:03 +0200
committerSven Gothel <[email protected]>2014-09-10 07:21:03 +0200
commitc97e35377aea70cb293cabdd205bcc5da64b95c6 (patch)
tree52b4be4132fca18aff3067c199b9d6e9d54dfcac /src/junit/com/jogamp/common/net/TestUri02Composing.java
parent6a466e3f1e92a1e831ea61d1bb72c32f56b2a28d (diff)
Bug 1063: Uri: Refine API doc; Add create(Encoded ..) ; Provide common impl. for getNormalized(), getDirectory(), getParent() and getRelativeOf()
- Refine API doc - Add notion of {@code host} and {@code port} validation - Add create(Encoded ..), allowing creation of variants w/o re-encoding - Provide common impl. for getNormalized(), getDirectory(), getParent() and getRelativeOf() Above feature methods share common goals, hence use same implementation: - If opaque, cut-off query and merge after operation - cleanup path, i.e. /dummy/../test/ -> /test/ - cutoff file, dir - if requested - append optional appendix and cleanup again Return behavior various thought, i.e. null, this or allow exception. Enhanced test of above features.
Diffstat (limited to 'src/junit/com/jogamp/common/net/TestUri02Composing.java')
-rw-r--r--src/junit/com/jogamp/common/net/TestUri02Composing.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/junit/com/jogamp/common/net/TestUri02Composing.java b/src/junit/com/jogamp/common/net/TestUri02Composing.java
index 33d17b8..50e8e07 100644
--- a/src/junit/com/jogamp/common/net/TestUri02Composing.java
+++ b/src/junit/com/jogamp/common/net/TestUri02Composing.java
@@ -61,7 +61,7 @@ public class TestUri02Composing extends JunitTracer {
}
static void testUriCompositioning(final Uri refURI, final Uri uri1) throws MalformedURLException, URISyntaxException {
System.err.println("scheme <"+uri1.scheme+">, ssp <"+uri1.schemeSpecificPart+">, fragment <"+uri1.fragment+">");
- final Uri uri2 = Uri.compose(uri1.scheme, uri1.schemeSpecificPart, null, uri1.fragment);
+ final Uri uri2 = uri1.getRelativeOf(null);
System.err.println("URL-equals: "+refURI.equals(uri2));
System.err.println("URL-ref : <"+refURI+">");
@@ -76,7 +76,7 @@ public class TestUri02Composing extends JunitTracer {
static void testURLCompositioning(final URL refURL, final URL url1) throws MalformedURLException, URISyntaxException {
final Uri uri1 = Uri.valueOf(url1);
System.err.println("scheme <"+uri1.scheme+">, ssp <"+uri1.schemeSpecificPart+">, fragment <"+uri1.fragment+">");
- final Uri uri2 = Uri.compose(uri1.scheme, uri1.schemeSpecificPart, null, uri1.fragment);
+ final Uri uri2 = uri1.getRelativeOf(null);
System.err.println("URL-equals(1): "+refURL.toURI().equals(uri2));
System.err.println("URL-equals(2): "+refURL.equals(uri2.toURL()));