Fix issue with loading tracks with configurate
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ public class PermissionDescriptionProxy implements PermissionDescription {
|
||||
@Override
|
||||
public Map<Subject, Boolean> getAssignedSubjects(String s) {
|
||||
return handle.getAssignedSubjects(s).entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
e -> new SubjectProxy(service, e.getKey().toReference()),
|
||||
Map.Entry::getValue
|
||||
));
|
||||
|
||||
+2
-2
@@ -70,7 +70,7 @@ public class PermissionServiceProxy implements PermissionService {
|
||||
@Override
|
||||
public Map<String, SubjectCollection> getKnownSubjects() {
|
||||
return handle.getLoadedCollections().entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
Map.Entry::getKey,
|
||||
e -> e.getValue().sponge()
|
||||
));
|
||||
@@ -93,7 +93,7 @@ public class PermissionServiceProxy implements PermissionService {
|
||||
|
||||
@Override
|
||||
public Collection<PermissionDescription> getDescriptions() {
|
||||
return handle.getDescriptions().stream().map(LPPermissionDescription::sponge).collect(ImmutableCollectors.toImmutableSet());
|
||||
return handle.getDescriptions().stream().map(LPPermissionDescription::sponge).collect(ImmutableCollectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@ public class SubjectCollectionProxy implements SubjectCollection {
|
||||
return (List) handle.getAllIdentifiers()
|
||||
.thenApply(ids -> ids.stream()
|
||||
.map(s -> new SubjectProxy(service, service.newSubjectReference(getIdentifier(), s)))
|
||||
.collect(ImmutableCollectors.toImmutableList())
|
||||
.collect(ImmutableCollectors.toList())
|
||||
).join();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class SubjectCollectionProxy implements SubjectCollection {
|
||||
// again, these methods will lazily load subjects.
|
||||
return (Map) handle.getAllWithPermission(s)
|
||||
.thenApply(map -> map.entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
e -> new SubjectProxy(service, e.getKey()),
|
||||
Map.Entry::getValue
|
||||
))
|
||||
@@ -92,7 +92,7 @@ public class SubjectCollectionProxy implements SubjectCollection {
|
||||
public Map<Subject, Boolean> getAllWithPermission(Set<Context> set, String s) {
|
||||
return (Map) handle.getAllWithPermission(CompatibilityUtil.convertContexts(set), s)
|
||||
.thenApply(map -> map.entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
e -> new SubjectProxy(service, e.getKey()),
|
||||
Map.Entry::getValue
|
||||
))
|
||||
|
||||
+5
-5
@@ -59,7 +59,7 @@ public class SubjectDataProxy implements SubjectData {
|
||||
public Map<Set<Context>, Map<String, Boolean>> getAllPermissions() {
|
||||
return (Map) getHandle().thenApply(handle -> {
|
||||
return handle.getAllPermissions().entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
e -> CompatibilityUtil.convertContexts(e.getKey()),
|
||||
Map.Entry::getValue
|
||||
));
|
||||
@@ -96,11 +96,11 @@ public class SubjectDataProxy implements SubjectData {
|
||||
@Override
|
||||
public Map<Set<Context>, List<Subject>> getAllParents() {
|
||||
return (Map) getHandle().thenApply(handle -> handle.getAllParents().entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
e -> CompatibilityUtil.convertContexts(e.getKey()),
|
||||
e -> e.getValue().stream()
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList())
|
||||
.collect(ImmutableCollectors.toList())
|
||||
)
|
||||
)).join();
|
||||
}
|
||||
@@ -109,7 +109,7 @@ public class SubjectDataProxy implements SubjectData {
|
||||
public List<Subject> getParents(Set<Context> contexts) {
|
||||
return (List) getHandle().thenApply(handle -> handle.getParents(CompatibilityUtil.convertContexts(contexts)).stream()
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList())).join();
|
||||
.collect(ImmutableCollectors.toList())).join();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,7 +151,7 @@ public class SubjectDataProxy implements SubjectData {
|
||||
@Override
|
||||
public Map<Set<Context>, Map<String, String>> getAllOptions() {
|
||||
return (Map) getHandle().thenApply(handle -> handle.getAllOptions().entrySet().stream()
|
||||
.collect(ImmutableCollectors.toImmutableMap(
|
||||
.collect(ImmutableCollectors.toMap(
|
||||
e -> CompatibilityUtil.convertContexts(e.getKey()),
|
||||
Map.Entry::getValue
|
||||
))).join();
|
||||
|
||||
+2
-2
@@ -117,14 +117,14 @@ public class SubjectProxy implements Subject {
|
||||
public List<Subject> getParents() {
|
||||
return (List) getHandle().thenApply(handle -> handle.getParents(ImmutableContextSet.empty()).stream()
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList())).join();
|
||||
.collect(ImmutableCollectors.toList())).join();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Subject> getParents(Set<Context> contexts) {
|
||||
return (List) getHandle().thenApply(handle -> handle.getParents(CompatibilityUtil.convertContexts(contexts)).stream()
|
||||
.map(s -> new SubjectProxy(service, s))
|
||||
.collect(ImmutableCollectors.toImmutableList())).join();
|
||||
.collect(ImmutableCollectors.toList())).join();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user