Open
Conversation
String getColumnLabel(int column) throws SQLException Gets the designated column's suggested title for use in printouts and displays. The suggested title is usually specified by the SQL AS clause. If a SQL AS is not specified, the value returned from getColumnLabel will be the same as the value returned by the getColumnName method. --from jdk1.6 javadoc
|
|
||
| for (int col = 1; col <= cols; col++) { | ||
| String columnName = rsmd.getColumnLabel(col); | ||
| if (null == columnName || 0 == columnName.length()) { |
Member
There was a problem hiding this comment.
How about using "columnName.isEmpty()" instead of "0 == columnName.length()"
May you please add a unit test?
Member
There was a problem hiding this comment.
This whole patch seems redundant with what JDBC specifies as the behavior for getColumnLabel(). What am I missing? This patch is workaround for buggy JDBC drivers?
VanniMaceria
added a commit
to VanniMaceria/progetto-software-dependability
that referenced
this pull request
Oct 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
String getColumnLabel(int column) throws SQLException
Gets the designated column's suggested title for use in printouts and displays. The suggested title is usually specified by the SQL AS clause. If a SQL AS is not specified, the value returned from getColumnLabel will be the same as the value returned by the getColumnName method. --from jdk1.6 javadoc