Remove redundant parentheses in lambda statements
Change-Id: I1e89aaea2d1a122fa3f13eb09cf7a2103540df57
This commit is contained in:
@@ -375,7 +375,7 @@ abstract class AbstractElasticIndex<K, V> implements Index<K, V> {
|
||||
|
||||
@Override
|
||||
public ResultSet<V> read() throws OrmException {
|
||||
return readImpl((doc) -> AbstractElasticIndex.this.fromDocument(doc, opts.fields()));
|
||||
return readImpl(doc -> AbstractElasticIndex.this.fromDocument(doc, opts.fields()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -498,12 +498,12 @@ public abstract class PermissionBackend {
|
||||
public Set<LabelPermission.WithValue> testLabels(Collection<LabelType> types)
|
||||
throws PermissionBackendException {
|
||||
requireNonNull(types, "LabelType");
|
||||
return test(types.stream().flatMap((t) -> valuesOf(t).stream()).collect(toSet()));
|
||||
return test(types.stream().flatMap(t -> valuesOf(t).stream()).collect(toSet()));
|
||||
}
|
||||
|
||||
private static Set<LabelPermission.WithValue> valuesOf(LabelType label) {
|
||||
return label.getValues().stream()
|
||||
.map((v) -> new LabelPermission.WithValue(label, v))
|
||||
.map(v -> new LabelPermission.WithValue(label, v))
|
||||
.collect(toSet());
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ public abstract class RetryingRestCollectionModifyView<
|
||||
@Override
|
||||
public final O apply(P parentResource, I input)
|
||||
throws AuthException, BadRequestException, ResourceConflictException, Exception {
|
||||
return retryHelper.execute((updateFactory) -> applyImpl(updateFactory, parentResource, input));
|
||||
return retryHelper.execute(updateFactory -> applyImpl(updateFactory, parentResource, input));
|
||||
}
|
||||
|
||||
protected abstract O applyImpl(BatchUpdate.Factory updateFactory, P parentResource, I input)
|
||||
|
@@ -27,7 +27,7 @@ public abstract class RetryingRestModifyView<R extends RestResource, I, O>
|
||||
|
||||
@Override
|
||||
public final O apply(R resource, I input) throws Exception {
|
||||
return retryHelper.execute((updateFactory) -> applyImpl(updateFactory, resource, input));
|
||||
return retryHelper.execute(updateFactory -> applyImpl(updateFactory, resource, input));
|
||||
}
|
||||
|
||||
protected abstract O applyImpl(BatchUpdate.Factory updateFactory, R resource, I input)
|
||||
|
Reference in New Issue
Block a user