quick compilation fix

This commit is contained in:
Eugen Paraschiv 2018-12-11 09:52:10 +02:00
parent 3bec6f7eff
commit 5afdce78ea
1 changed files with 4 additions and 8 deletions

View File

@ -1,13 +1,12 @@
package com.baeldung.jpa.stringcast;
import com.sun.istack.internal.Nullable;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.persistence.EntityManager;
import javax.persistence.Query;
public class QueryExecutor {
public static List<String[]> executeNativeQueryNoCastCheck(String statement, EntityManager em) {
@ -24,10 +23,7 @@ public class QueryExecutor {
}
if (results.get(0) instanceof String) {
return ((List<String>) results)
.stream()
.map(s -> new String[] { s })
.collect(Collectors.toList());
return ((List<String>) results).stream().map(s -> new String[] { s }).collect(Collectors.toList());
} else {
return (List<String[]>) results;
}