reschke commented on code in PR #1678:
URL: https://github.com/apache/jackrabbit-oak/pull/1678#discussion_r1751905317


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/Namespaces.java:
##########
@@ -138,8 +138,10 @@ public static String addCustomMapping(
     public static void buildIndexNode(NodeBuilder namespaces) {
         // initialize prefix and URI sets with the defaults namespace
         // that's not stored along with the other mappings
-        Set<String> prefixes = newHashSet("");
-        Set<String> uris = newHashSet("");
+        Set<String> prefixes = new HashSet<>();

Review Comment:
   Use CollectionUtils?



##########
oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/LimitedScopeProvider.java:
##########
@@ -34,6 +34,7 @@
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
+

Review Comment:
   drop



##########
oak-run/src/main/java/org/apache/jackrabbit/oak/index/IndexDefinitionUpdater.java:
##########
@@ -280,7 +280,7 @@ private static String toString(PropertyState ps) {
                 String v = BLOB_LENGTH.apply(ps.getValue(BINARY));
                 val.append(" = {").append(v).append("}");
             } else if (ps.getType() == BINARIES) {
-                String v = stream(ps.getValue(BINARIES).spliterator(), false)
+                String v = 
StreamSupport.stream(ps.getValue(BINARIES).spliterator(), false)

Review Comment:
   CollectionUtils?



##########
oak-run/src/main/java/org/apache/jackrabbit/oak/index/IndexDefinitionUpdater.java:
##########
@@ -130,7 +130,7 @@ private void writeReindexingLuceneDefs(String outFilePath, 
List<String> reindexi
     }
 
     private List<String> getReindexIndexPaths() {
-        return 
stream(store.getRoot().getChildNode(INDEX_DEFINITIONS_NAME).getChildNodeEntries().spliterator(),
 false)
+        return 
StreamSupport.stream(store.getRoot().getChildNode(INDEX_DEFINITIONS_NAME).getChildNodeEntries().spliterator(),
 false)

Review Comment:
   Use CollectionUtils?



##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/ActiveDeletedBlobCollectorMBeanImpl.java:
##########
@@ -213,7 +213,7 @@ public void flagActiveDeletionSafe() {
      */
     private boolean waitForRunningIndexCycles() {
         Map<IndexStatsMBean, Long> origIndexLaneToExecutinoCountMap = 
Maps.asMap(
-                
Sets.newHashSet(StreamSupport.stream(asyncIndexInfoService.getAsyncLanes().spliterator(),
 false)
+                new 
HashSet<>(StreamSupport.stream(asyncIndexInfoService.getAsyncLanes().spliterator(),
 false)

Review Comment:
   use CollectionUtils?



##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSupport.java:
##########
@@ -102,11 +102,11 @@ public Iterable<NodeDocument> getModifiedDocs(final long 
fromModified, final lon
                                                   @NotNull final Set<String> 
includePaths,
                                                   @NotNull final Set<String> 
excludePaths) {
         // (_modified = fromModified && _id > fromId || _modified > 
fromModified && _modified < toModified)
-        final Stream<NodeDocument> s1 = stream(getSelectedDocuments(store,
+        final Stream<NodeDocument> s1 = 
StreamSupport.stream(getSelectedDocuments(store,

Review Comment:
   CollectionUtils?



##########
oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java:
##########
@@ -29,13 +29,13 @@
 import org.jetbrains.annotations.Nullable;
 
 import javax.jcr.Session;
-import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
-import java.util.stream.Collectors;
+
+import static java.util.stream.Collectors.toSet;
 

Review Comment:
   We should agree on a consistent strategy whether the Collector imports 
should be static (I'm leaning towards "no")..



##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSupport.java:
##########
@@ -75,7 +75,7 @@ public VersionGCSupport(DocumentStore store) {
      * @return matching documents.
      */
     public Iterable<NodeDocument> getPossiblyDeletedDocs(final long 
fromModified, final long toModified) {
-        return stream(getSelectedDocuments(store, NodeDocument.DELETED_ONCE, 
1).spliterator(), false)
+        return StreamSupport.stream(getSelectedDocuments(store, 
NodeDocument.DELETED_ONCE, 1).spliterator(), false)

Review Comment:
   CollectionUtils?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to