-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAK-11311: Remove usage of Guava ImmutableList #1909
Conversation
.../main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/SimpleFlatFileUtil.java
Show resolved
Hide resolved
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/Aggregate.java
Show resolved
Hide resolved
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/PropertyDefinition.java
Show resolved
Hide resolved
...ecurity-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/CompositeConfiguration.java
Outdated
Show resolved
Hide resolved
...ecurity-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/CompositeConfiguration.java
Outdated
Show resolved
Hide resolved
...ecurity-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/CompositeConfiguration.java
Outdated
Show resolved
Hide resolved
...ecurity-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/CompositeConfiguration.java
Outdated
Show resolved
Hide resolved
@@ -86,7 +86,7 @@ public static Set<String> getChildNodeNames(Collection<String> keys, Matcher mat | |||
int expectedDepth = matcher.depth() + 1; | |||
|
|||
for (String key : keys){ | |||
List<String> elements = ImmutableList.copyOf(PathUtils.elements(key)); | |||
List<String> elements = CollectionUtils.toList(PathUtils.elements(key)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collections.unmodifiableList
miss or intended ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it's clearly ok.
...store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/Include.java
Show resolved
Hide resolved
oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/AggregateTest.java
Show resolved
Hide resolved
I will review all of these once I'm done with the next module - FWIW, none of these changes cause tests to fail. |
...rc/main/java/org/apache/jackrabbit/oak/plugins/document/secondary/SecondaryStoreBuilder.java
Outdated
Show resolved
Hide resolved
…duplicate import
… remove unused imports
…ake a few lists unmodifiable
Quality Gate failedFailed conditions |
List<String> builder = new ArrayList<>(); | ||
builder.add(MongoUtils.URL); | ||
builder.addAll(Arrays.asList(args)); | ||
this.args = Collections.unmodifiableList(builder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for Collections.unmodifiableList
in test class.
@@ -161,7 +159,8 @@ public void orToUnions() throws RepositoryException, CommitFailedException { | |||
statement = String.format( | |||
"SELECT * FROM [%s] WHERE (p = 'a' AND p1 = 'a1') OR (p = 'b' AND p1 = 'b1')", | |||
NT_OAK_UNSTRUCTURED); | |||
expected = of("/test/a", "/test/b"); | |||
expected = List.of("/test/a", "/test/b"); | |||
expected = List.of("/test/a", "/test/b"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repeat of above line.
@@ -239,14 +239,13 @@ boolean reverseOrder() { | |||
List<AggregatedPermissionProvider> getAggregatedProviders(@NotNull String workspaceName, | |||
@NotNull AuthorizationConfiguration config, | |||
@NotNull Set<Principal> principals) { | |||
ImmutableList<AggregatedPermissionProvider> l = ImmutableList.of( | |||
List<AggregatedPermissionProvider> l = new ArrayList<>(List.of( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List<AggregatedPermissionProvider> l = new ArrayList<>(List.of( | |
List<AggregatedPermissionProvider> l = Stream.of((AggregatedPermissionProvider) config.getPermissionProvider(root, workspaceName, principals), | |
getTestPermissionProvider()).collect(Collectors.toList()); |
@@ -36,6 +37,7 @@ | |||
import org.jetbrains.annotations.Nullable; | |||
import org.junit.Test; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert this.
Ready for review.