Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CharacterTypeHandler#getNullableResult() throws StringIndexOutOfBoundsException #2368

Merged
merged 3 commits into from
Dec 10, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void setNonNullParameter(PreparedStatement ps, int i, Character parameter
@Override
public Character getNullableResult(ResultSet rs, String columnName) throws SQLException {
String columnValue = rs.getString(columnName);
if (columnValue != null) {
if (columnValue != null && !columnValue.isEmpty()) {
return columnValue.charAt(0);
} else {
return null;
Expand All @@ -43,7 +43,7 @@ public Character getNullableResult(ResultSet rs, String columnName) throws SQLEx
@Override
public Character getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
String columnValue = rs.getString(columnIndex);
if (columnValue != null) {
if (columnValue != null && !columnValue.isEmpty()) {
return columnValue.charAt(0);
} else {
return null;
Expand All @@ -53,7 +53,7 @@ public Character getNullableResult(ResultSet rs, int columnIndex) throws SQLExce
@Override
public Character getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
String columnValue = cs.getString(columnIndex);
if (columnValue != null) {
if (columnValue != null && !columnValue.isEmpty()) {
return columnValue.charAt(0);
} else {
return null;
Expand Down