Skip to content

OAK-11744 : removed usage of Guava's ImmutableList#2320

Merged
rishabhdaim merged 1 commit intotrunkfrom
OAK-11744
Jun 2, 2025
Merged

OAK-11744 : removed usage of Guava's ImmutableList#2320
rishabhdaim merged 1 commit intotrunkfrom
OAK-11744

Conversation

@rishabhdaim
Copy link
Contributor

No description provided.

@github-actions
Copy link

Commit-Check ✔️

@Override
public AccessControlPolicy[] getPolicies(String absPath) throws RepositoryException {
ImmutableList.Builder<AccessControlPolicy> policies = ImmutableList.builder();
List<AccessControlPolicy> policies = new ArrayList<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for Immutability here, since the List is never exposed outside the method.

@Override
public AccessControlPolicy[] getEffectivePolicies(String absPath) throws RepositoryException {
ImmutableList.Builder<AccessControlPolicy> policies = ImmutableList.builder();
List<AccessControlPolicy> policies = new ArrayList<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Override
public JackrabbitAccessControlPolicy[] getApplicablePolicies(@NotNull Principal principal) throws RepositoryException {
ImmutableList.Builder<JackrabbitAccessControlPolicy> policies = ImmutableList.builder();
List<JackrabbitAccessControlPolicy> policies = new ArrayList<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@Override
public JackrabbitAccessControlPolicy[] getPolicies(@NotNull Principal principal) throws RepositoryException {
ImmutableList.Builder<JackrabbitAccessControlPolicy> policies = ImmutableList.builder();
List<JackrabbitAccessControlPolicy> policies = new ArrayList<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Override
public AccessControlPolicy[] getEffectivePolicies(@NotNull Set<Principal> principals) throws RepositoryException {
ImmutableList.Builder<AccessControlPolicy> policies = ImmutableList.builder();
List<AccessControlPolicy> policies = new ArrayList<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@Override
public @NotNull Iterator<AccessControlPolicy> getEffectivePolicies(@NotNull Set<Principal> principals, @Nullable String... absPaths) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException {
ImmutableList.Builder<Iterator<AccessControlPolicy>> iterators = ImmutableList.builder();
List<Iterator<AccessControlPolicy>> iterators = new ArrayList<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@rishabhdaim
Copy link
Contributor Author

@Amoratinos, could you please review this?

@sonarqubecloud
Copy link

Copy link
Contributor

@Amoratinos Amoratinos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM

@rishabhdaim rishabhdaim merged commit 2ec6d67 into trunk Jun 2, 2025
5 checks passed
@rishabhdaim rishabhdaim deleted the OAK-11744 branch June 2, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants