Skip to content

Commit

Permalink
Fix conditional logic for string length checks (#59)
Browse files Browse the repository at this point in the history
Corrected the conditional checks for 'parentDisplay', 'parentName', and 'description' in the MetadataResultSetUtil class. This ensures that non-empty strings are returned appropriately, enhancing the accuracy of metadata retrieval.
  • Loading branch information
Gcolon021 authored Nov 21, 2024
1 parent 60d3904 commit 895525d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ private static String bytesToHex(byte[] hash) {
}

private String getParentDisplay(ResultSet rs) throws SQLException {
return StringUtils.hasLength("parentDisplay") ? "" : rs.getString("parentDisplay");
return StringUtils.hasLength("parentDisplay") ? rs.getString("parentDisplay") : "";
}

private String getParentName(ResultSet rs) throws SQLException {
return StringUtils.hasLength(rs.getString("parentName")) ? "All Variables" : rs.getString("parentName");
return StringUtils.hasLength(rs.getString("parentName")) ? rs.getString("parentName") : "All Variables";
}

private String getDescription(ResultSet rs) throws SQLException {
return StringUtils.hasLength(rs.getString("description")) ? "" : rs.getString("description");
return StringUtils.hasLength(rs.getString("description")) ? rs.getString("description") : "";
}
}

0 comments on commit 895525d

Please sign in to comment.