You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2026/06/24 10:24:55 UTC
(jackrabbit-oak) branch OAK-12265 created (now ff39592137)
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a change to branch OAK-12265
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
at ff39592137 OAK-12265: remove json-simple dependency in oak-pojosr
This branch includes the following new commits:
new ff39592137 OAK-12265: remove json-simple dependency in oak-pojosr
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(jackrabbit-oak) 01/01: OAK-12265: remove json-simple dependency in oak-pojosr
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch OAK-12265
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit ff395921377bc3fe15a9c7f7ffeb1c111d4c8da5
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Wed Jun 24 11:24:19 2026 +0100
OAK-12265: remove json-simple dependency in oak-pojosr
---
oak-pojosr/pom.xml | 5 -----
.../org/apache/jackrabbit/oak/run/osgi/ConfigTracker.java | 14 ++++++++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/oak-pojosr/pom.xml b/oak-pojosr/pom.xml
index d5b7a57581..761c3c23e1 100644
--- a/oak-pojosr/pom.xml
+++ b/oak-pojosr/pom.xml
@@ -167,11 +167,6 @@
<artifactId>org.apache.aries.jmx.whiteboard</artifactId>
<version>1.0.0</version>
</dependency>
- <dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- <version>1.1.1</version>
- </dependency>
<!--
diff --git a/oak-pojosr/src/main/java/org/apache/jackrabbit/oak/run/osgi/ConfigTracker.java b/oak-pojosr/src/main/java/org/apache/jackrabbit/oak/run/osgi/ConfigTracker.java
index 6ba8b5126a..def8aa2df2 100644
--- a/oak-pojosr/src/main/java/org/apache/jackrabbit/oak/run/osgi/ConfigTracker.java
+++ b/oak-pojosr/src/main/java/org/apache/jackrabbit/oak/run/osgi/ConfigTracker.java
@@ -29,9 +29,10 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
import org.apache.jackrabbit.oak.commons.collections.SetUtils;
-import org.json.simple.JSONObject;
-import org.json.simple.JSONValue;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.ConfigurationAdmin;
@@ -117,8 +118,13 @@ class ConfigTracker extends ServiceTracker<ConfigurationAdmin, ConfigurationAdmi
}
String content = new String(Files.readAllBytes(jsonFile.toPath()), StandardCharsets.UTF_8);
- JSONObject json = (JSONObject) JSONValue.parse(content);
- configs.putAll(json);
+ ObjectMapper mapper = new ObjectMapper();
+ Map<String, Map<String, Object>> map = mapper.readValue(
+ content,
+ new TypeReference<>() {
+ }
+ );
+ configs.putAll(map);
}
return configs;