Skip to content

Commit 2ffac0a

Browse files
committed
DATAMONGO-1491 - Polishing.
Remove variable before returning value. Add generics for list creation. Original pull request: #412.
1 parent ded99a7 commit 2ffac0a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationExpressions.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ private Object getMappedCondition(AggregationOperationContext context) {
131131
}
132132

133133
NestedDelegatingExpressionAggregationOperationContext nea = new NestedDelegatingExpressionAggregationOperationContext(context);
134-
Document mappedCondition = ((AggregationExpression) condition).toDocument(nea);
135-
return mappedCondition;
134+
return ((AggregationExpression) condition).toDocument(nea);
136135
}
137136

138137
/**
@@ -224,7 +223,7 @@ public static InputBuilder newBuilder() {
224223
public AsBuilder filter(List<?> array) {
225224

226225
Assert.notNull(array, "Array must not be null!");
227-
filter.input = new ArrayList(array);
226+
filter.input = new ArrayList<Object>(array);
228227
return this;
229228
}
230229

@@ -288,7 +287,5 @@ public Filter by(Document expression) {
288287
return filter;
289288
}
290289
}
291-
292290
}
293-
294291
}

0 commit comments

Comments
 (0)