Skip to content

Commit 3dc1e93

Browse files
committed
DATAMONGO-1491 - Polishing.
Remove variable before returning value. Add generics for list creation. Original pull request: #412.
1 parent 2985b4c commit 3dc1e93

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
@@ -130,8 +130,7 @@ private Object getMappedCondition(AggregationOperationContext context) {
130130
}
131131

132132
NestedDelegatingExpressionAggregationOperationContext nea = new NestedDelegatingExpressionAggregationOperationContext(context);
133-
DBObject mappedCondition = ((AggregationExpression) condition).toDbObject(nea);
134-
return mappedCondition;
133+
return ((AggregationExpression) condition).toDbObject(nea);
135134
}
136135

137136
/**
@@ -223,7 +222,7 @@ public static InputBuilder newBuilder() {
223222
public AsBuilder filter(List<?> array) {
224223

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

@@ -287,7 +286,5 @@ public Filter by(DBObject expression) {
287286
return filter;
288287
}
289288
}
290-
291289
}
292-
293290
}

0 commit comments

Comments
 (0)