Skip to content

Commit 38a8578

Browse files
rishabhdaimRishabh Kumar
andauthored
OAK-11752 : removed usage of Guava's Lists.transform (#2325)
Co-authored-by: Rishabh Kumar <diam@adobe.com>
1 parent f6e9e84 commit 38a8578

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import java.util.Properties;
4444
import java.util.Set;
4545
import java.util.concurrent.TimeUnit;
46+
import java.util.stream.Collectors;
4647

4748
import javax.jcr.NamespaceException;
4849
import javax.jcr.Node;
@@ -56,7 +57,6 @@
5657
import javax.jcr.nodetype.PropertyDefinitionTemplate;
5758
import javax.jcr.security.Privilege;
5859

59-
import org.apache.jackrabbit.guava.common.collect.Lists;
6060
import org.apache.commons.collections4.bidimap.DualHashBidiMap;
6161
import org.apache.jackrabbit.JcrConstants;
6262
import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
@@ -772,8 +772,9 @@ private void copyCustomPrivileges(PrivilegeManager pMgr) throws RepositoryExcept
772772
while (it.hasNext()) {
773773
Privilege aggrPriv = it.next();
774774

775-
List<String> aggrNames = Lists.transform(Arrays.asList(aggrPriv.getDeclaredAggregatePrivileges()),
776-
input -> (input == null) ? null : input.getName());
775+
List<String> aggrNames = Arrays.stream(aggrPriv.getDeclaredAggregatePrivileges())
776+
.map(input -> (input == null) ? null : input.getName())
777+
.collect(Collectors.toList());
777778
if (allAggregatesRegistered(pMgr, aggrNames)) {
778779
pMgr.registerPrivilege(aggrPriv.getName(), aggrPriv.isAbstract(), aggrNames.toArray(new String[aggrNames.size()]));
779780
it.remove();

0 commit comments

Comments
 (0)