Remove redundant parentheses in lambda statements

Change-Id: I1e89aaea2d1a122fa3f13eb09cf7a2103540df57
This commit is contained in:
David Pursehouse
2020-02-19 17:42:07 +09:00
parent 2b4df55471
commit d77a118150
4 changed files with 5 additions and 5 deletions

View File

@@ -375,7 +375,7 @@ abstract class AbstractElasticIndex<K, V> implements Index<K, V> {
@Override @Override
public ResultSet<V> read() throws OrmException { 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 @Override

View File

@@ -498,12 +498,12 @@ public abstract class PermissionBackend {
public Set<LabelPermission.WithValue> testLabels(Collection<LabelType> types) public Set<LabelPermission.WithValue> testLabels(Collection<LabelType> types)
throws PermissionBackendException { throws PermissionBackendException {
requireNonNull(types, "LabelType"); 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) { private static Set<LabelPermission.WithValue> valuesOf(LabelType label) {
return label.getValues().stream() return label.getValues().stream()
.map((v) -> new LabelPermission.WithValue(label, v)) .map(v -> new LabelPermission.WithValue(label, v))
.collect(toSet()); .collect(toSet());
} }
} }

View File

@@ -32,7 +32,7 @@ public abstract class RetryingRestCollectionModifyView<
@Override @Override
public final O apply(P parentResource, I input) public final O apply(P parentResource, I input)
throws AuthException, BadRequestException, ResourceConflictException, Exception { 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) protected abstract O applyImpl(BatchUpdate.Factory updateFactory, P parentResource, I input)

View File

@@ -27,7 +27,7 @@ public abstract class RetryingRestModifyView<R extends RestResource, I, O>
@Override @Override
public final O apply(R resource, I input) throws Exception { 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) protected abstract O applyImpl(BatchUpdate.Factory updateFactory, R resource, I input)