Skip to content

Commit

Permalink
Added trim() after null check
Browse files Browse the repository at this point in the history
  • Loading branch information
ravib777 committed Oct 26, 2022
1 parent 89a1abe commit 6924535
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ protected String[] tableTypes(
Set<String> matchingTableTypes = new HashSet<>();
try (ResultSet rs = metadata.getTableTypes()) {
while (rs.next()) {
String tableType = rs.getString(1).trim();
if (tableType != null && uppercaseTypes.contains(tableType.toUpperCase(Locale.ROOT))) {
matchingTableTypes.add(tableType);
String tableType = rs.getString(1);
if (tableType != null && uppercaseTypes.contains(tableType.trim().toUpperCase(Locale.ROOT))) {
matchingTableTypes.add(tableType.trim());
}
}
}
Expand Down

0 comments on commit 6924535

Please sign in to comment.