Skip to content

Commit 4bd6508

Browse files
authored
Update CharacterTypeHandler.java
1 parent 983e664 commit 4bd6508

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/apache/ibatis/type/CharacterTypeHandler.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void setNonNullParameter(PreparedStatement ps, int i, Character parameter
3333
@Override
3434
public Character getNullableResult(ResultSet rs, String columnName) throws SQLException {
3535
String columnValue = rs.getString(columnName);
36-
if (columnValue != null && columnValue != "") {
36+
if (columnValue != null && !columnValue.isEmpty()) {
3737
return columnValue.charAt(0);
3838
} else {
3939
return null;
@@ -43,7 +43,7 @@ public Character getNullableResult(ResultSet rs, String columnName) throws SQLEx
4343
@Override
4444
public Character getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
4545
String columnValue = rs.getString(columnIndex);
46-
if (columnValue != null && columnValue != "") {
46+
if (columnValue != null && !columnValue.isEmpty()) {
4747
return columnValue.charAt(0);
4848
} else {
4949
return null;
@@ -53,7 +53,7 @@ public Character getNullableResult(ResultSet rs, int columnIndex) throws SQLExce
5353
@Override
5454
public Character getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
5555
String columnValue = cs.getString(columnIndex);
56-
if (columnValue != null && columnValue != "") {
56+
if (columnValue != null && !columnValue.isEmpty()) {
5757
return columnValue.charAt(0);
5858
} else {
5959
return null;

0 commit comments

Comments
 (0)