mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-11-21 16:45:02 -05:00
Fix NullListQueryMapper.java for java6
This commit is contained in:
parent
7c053176d2
commit
8698c2740d
@ -5,15 +5,13 @@ import com.moparisthebest.jdbc.util.ResultSetIterable;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
//IFJAVA8_START
|
||||
import java.util.stream.Stream;
|
||||
//IFJAVA8_END
|
||||
|
||||
import static com.moparisthebest.jdbc.NullQueryMapper.safeHandler;
|
||||
|
||||
//IFJAVA8_START
|
||||
//IFJAVA8_END
|
||||
|
||||
public class NullListQueryMapper extends ListQueryMapper {
|
||||
|
||||
protected final NullQueryMapper.ThrowableHandler handler;
|
||||
@ -90,7 +88,7 @@ public class NullListQueryMapper extends ListQueryMapper {
|
||||
public <T> InList.InListObject inList(String columnName, Collection<T> values) {
|
||||
try {
|
||||
return delegate.inList(columnName, values);
|
||||
} catch (SQLException e) {
|
||||
} catch (Throwable e) {
|
||||
handler.handle(e);
|
||||
}
|
||||
return null;
|
||||
@ -100,7 +98,7 @@ public class NullListQueryMapper extends ListQueryMapper {
|
||||
public <T> InList.InListObject notInList(String columnName, Collection<T> values) {
|
||||
try {
|
||||
return delegate.notInList(columnName, values);
|
||||
} catch (SQLException e) {
|
||||
} catch (Throwable e) {
|
||||
handler.handle(e);
|
||||
}
|
||||
return null;
|
||||
|
@ -5,7 +5,6 @@ import com.moparisthebest.jdbc.util.ResultSetIterable;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
//IFJAVA8_START
|
||||
import java.util.stream.Stream;
|
||||
|
Loading…
Reference in New Issue
Block a user