From 12345f16231d951fbf314205cf4ee75d6286ba09 Mon Sep 17 00:00:00 2001
From: Georg Koester
Date: Sun, 21 Jan 2018 16:50:34 +0100
Subject: [PATCH 1/3] Fix some javadoc errors.
Change-Id: I82a154a810b9e804e059abc913c4cf63fda1d726
---
src/main/java/com/pidoco/juri/JURI.java | 32 ++++++++++++-------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/pidoco/juri/JURI.java b/src/main/java/com/pidoco/juri/JURI.java
index 0647e38..d313f12 100644
--- a/src/main/java/com/pidoco/juri/JURI.java
+++ b/src/main/java/com/pidoco/juri/JURI.java
@@ -58,14 +58,14 @@
*
* The class doesn't verify the URI until {@link #getCurrentUri()} or any of the
* methods calling it like {@link #toString()} are called. E.g.
- *
+ *
+ *
*
* cut = JURI.parse("http://[::1.1.1.1]")
* assertTrue(cut.setPath("dsfd/").isPathRelative());
* cut.getCurrentUri(); // fails here
*
- *
- *
+ *
*
*
* This is a mutable class - so it doesn't provide an equals or hashCode
@@ -583,12 +583,12 @@ public JURI addPathSegments(boolean slashAtEnd, String... segments) {
/**
*
- * "".addRawPath("") -> ""
- * "/".addRawPath("") -> "/"
- * "".addRawPath("/") -> "/"
- * "a".addRawPath("") -> "a/"
- * "a".addRawPath("b") -> "a/b"
- * "/".addRawPath("/") -> "/"
+ * "".addRawPath("") -> ""
+ * "/".addRawPath("") -> "/"
+ * "".addRawPath("/") -> "/"
+ * "a".addRawPath("") -> "a/"
+ * "a".addRawPath("b") -> "a/b"
+ * "/".addRawPath("/") -> "/"
*
*/
public JURI addRawPath(CharSequence toAdd) {
@@ -599,12 +599,12 @@ public JURI addRawPath(CharSequence toAdd) {
/**
*
- * "".addRawPath("") -> ""
- * "/".addRawPath("") -> "/"
- * "".addRawPath("/") -> "/"
- * "a".addRawPath("") -> "a/"
- * "a".addRawPath("b") -> "a/b"
- * "/".addRawPath("/") -> "/"
+ * "".addRawPath("") -> ""
+ * "/".addRawPath("") -> "/"
+ * "".addRawPath("/") -> "/"
+ * "a".addRawPath("") -> "a/"
+ * "a".addRawPath("b") -> "a/b"
+ * "/".addRawPath("/") -> "/"
*
*/
public static String concatRawPaths(CharSequence left, CharSequence right) {
@@ -655,7 +655,7 @@ public JURI setPath(@Nullable String unescapedPath) {
* segments if escaped by backslash.
*
* @param completeUnescapedPath
- * e.g. //b\/f//kf/ -> //b%XXf//kf/
+ * e.g. //b\/f//kf/ -> //b%XXf//kf/
* @return the used string builder.
*/
public static StringBuilder escapeMultiSegmentPath(String completeUnescapedPath) {
From 7ffd2a6d4ee06b1ee2f50383dc52accde5cdf41f Mon Sep 17 00:00:00 2001
From: Georg Koester
Date: Sun, 22 Jan 2017 19:45:23 +0100
Subject: [PATCH 2/3] Make it an OSGi bundle.
Change-Id: Ic0a499b5a96b2945ea3115b0a47aa43e3a682857
---
bnd.bnd | 5 +++++
build.gradle | 29 +++++++++++++++++++++++------
2 files changed, 28 insertions(+), 6 deletions(-)
create mode 100644 bnd.bnd
diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..7c79e8f
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1,5 @@
+-exportcontents: com.pidoco.juri
+-sources: true
+Test-Cases: ${classes;CONCRETE;PUBLIC;NAMED;*Test}
+
+Bundle-Description: The JURI library.
diff --git a/build.gradle b/build.gradle
index 0c74d04..1af1046 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,15 @@
+
+// got to use the buildscript way of specifying bnd plugin - plugins {id:...} fails
+// because automatically expecting/searching workspace (cnf folder above project folder)
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:3.5.0'
+ }
+}
+
apply plugin: 'java'
group = 'com.pidoco'
@@ -8,12 +20,15 @@ sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
-
- compile 'org.slf4j:slf4j-api:1.7.5'
- compile 'com.google.code.findbugs:jsr305:2.0.0'
+ compile 'org.slf4j:slf4j-api:1.7.25'
+ compile 'com.google.code.findbugs:jsr305:3.0.2'
compile 'com.google.guava:guava:18.0' // for URI element-specific escapers
- compile 'org.apache.commons:commons-lang3:3.3.2' // using this for null checks, common string modifications etc
- testCompile 'junit:junit:4.11'
+ compile 'org.apache.commons:commons-lang3:3.7' // using this for null checks, common string modifications etc
+
+ // testing in OSGi environment requires these wrappers
+ testCompile 'org.osgi:osgi.enroute.junit.wrapper:4.12.0'
+ testCompile 'org.osgi:osgi.enroute.hamcrest.wrapper:1.3.0'
+ testRuntime 'org.slf4j:slf4j-simple:1.7.25'
}
repositories {
@@ -44,6 +59,8 @@ publishing {
}
}
+apply plugin: 'biz.aQute.bnd.builder'
+
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
@@ -98,10 +115,10 @@ uploadArchives {
developer {
id 'georgkoester'
name 'Georg Koester'
+ email 'mail@georgkoester.de'
}
}
}
}
}
}
-
From 720ce4aad9f1f7bacad8aa78d8d951307fab800e Mon Sep 17 00:00:00 2001
From: Georg Koester
Date: Mon, 22 Jan 2018 23:12:23 +0100
Subject: [PATCH 3/3] Fix javax.annotation problems during OSGi usage.
Change-Id: Idbc522c1b9f2f81f16f34a5e696c4b94cad846ab
---
bnd.bnd | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bnd.bnd b/bnd.bnd
index 7c79e8f..844b5eb 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -3,3 +3,7 @@
Test-Cases: ${classes;CONCRETE;PUBLIC;NAMED;*Test}
Bundle-Description: The JURI library.
+
+Import-Package: \
+ javax.annotation; resolution:=optional; version=0, \
+ *