mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 08:54:20 +01:00
handle empty string in findColumn() method
This commit is contained in:
@@ -369,6 +369,10 @@ public final class JDBC4ResultSet implements ResultSet, ResultSetMetaData {
|
||||
|
||||
@Override
|
||||
public int findColumn(String columnLabel) throws SQLException {
|
||||
if (columnLabel == null || columnLabel.isEmpty()) {
|
||||
throw new SQLException("column name not found");
|
||||
}
|
||||
|
||||
final String[] columnNames = resultSet.getColumnNames();
|
||||
for (int i = 0; i < columnNames.length; i++) {
|
||||
if (columnNames[i].equals(columnLabel)) {
|
||||
|
||||
Reference in New Issue
Block a user