[GitHub] garydgregory commented on a change in pull request #5: optimize map columns 2 properties code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] garydgregory commented on a change in pull request #5: optimize map columns 2 properties code

GitBox
garydgregory commented on a change in pull request #5: optimize map columns 2 properties code
URL: https://github.com/apache/commons-dbutils/pull/5#discussion_r252210114
 
 

 ##########
 File path: src/main/java/org/apache/commons/dbutils/BeanProcessor.java
 ##########
 @@ -465,9 +465,6 @@ protected Method getWriteMethod(final Object target, final PropertyDescriptor pr
 
         for (int col = 1; col <= cols; col++) {
             String columnName = rsmd.getColumnLabel(col);
-            if (null == columnName || 0 == columnName.length()) {
 
 Review comment:
   How about using "columnName.isEmpty()" instead of "0 == columnName.length()"
   May you please add a unit test?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]