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 ba...@apache.org on 2024/01/31 10:22:25 UTC

(jackrabbit-oak) branch trunk updated: OAK-10635: BundledTypeRegistry replace guava collection refs with facade (#1291)

This is an automated email from the ASF dual-hosted git repository.

baedke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0cde85333b OAK-10635: BundledTypeRegistry replace guava collection refs with facade (#1291)
0cde85333b is described below

commit 0cde85333b1f3e40ffe6f1a4dd6f52f721da827a
Author: mbaedke <ma...@gmail.com>
AuthorDate: Wed Jan 31 11:22:19 2024 +0100

    OAK-10635: BundledTypeRegistry replace guava collection refs with facade (#1291)
    
    Removes the usage of shaded Guava in BundledTypesRegistry.
---
 .../oak/plugins/document/bundlor/BundledTypesRegistry.java    | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledTypesRegistry.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledTypesRegistry.java
index be627c3b1c..6442a87e0e 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledTypesRegistry.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledTypesRegistry.java
@@ -20,12 +20,11 @@
 package org.apache.jackrabbit.oak.plugins.document.bundlor;
 
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.jackrabbit.guava.common.collect.ImmutableMap;
-import org.apache.jackrabbit.guava.common.collect.Maps;
-import org.apache.jackrabbit.guava.common.collect.Sets;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
@@ -44,11 +43,11 @@ public class BundledTypesRegistry {
     private final Map<String, DocumentBundlor> bundlors;
 
     public BundledTypesRegistry(Map<String, DocumentBundlor> bundlors) {
-        this.bundlors = ImmutableMap.copyOf(bundlors);
+        this.bundlors = Collections.unmodifiableMap(new HashMap<>(bundlors));
     }
 
     public static BundledTypesRegistry from(NodeState configParentState){
-        Map<String, DocumentBundlor> bundlors = Maps.newHashMap();
+        Map<String, DocumentBundlor> bundlors = new HashMap<>();
         for (ChildNodeEntry e : configParentState.getChildNodeEntries()){
             NodeState config = e.getNodeState();
             if (config.getBoolean(DocumentBundlor.PROP_DISABLED)){
@@ -141,7 +140,7 @@ public class BundledTypesRegistry {
         public static class TypeBuilder {
             private final BundledTypesRegistryBuilder parent;
             private final NodeBuilder typeBuilder;
-            private final Set<String> patterns = Sets.newHashSet();
+            private final Set<String> patterns = new HashSet<>();
 
             private TypeBuilder(BundledTypesRegistryBuilder parent, NodeBuilder typeBuilder) {
                 this.parent = parent;