Skip to content

Commit 4296760

Browse files
slowikpsmohsinh
authored andcommitted
DATAES-230 - Remove unnecessary type check in AbstractElasticsearchRepository
1 parent 403a85b commit 4296760

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ public <S extends T> S index(S entity) {
166166
@Override
167167
public <S extends T> Iterable<S> save(Iterable<S> entities) {
168168
Assert.notNull(entities, "Cannot insert 'null' as a List.");
169-
if (!(entities instanceof Collection<?>)) {
170-
throw new InvalidDataAccessApiUsageException("Entities have to be inside a collection");
171-
}
172169
List<IndexQuery> queries = new ArrayList<IndexQuery>();
173170
for (S s : entities) {
174171
queries.add(createIndexQuery(s));

0 commit comments

Comments
 (0)