garydgregory commented on code in PR #218:
URL: https://github.com/apache/commons-dbutils/pull/218#discussion_r1405182753


##########
src/test/java/org/apache/commons/dbutils/BeanProcessorTest.java:
##########
@@ -186,19 +187,21 @@ public void setTestField(final int idx, final Integer 
testField) {
         }
     }
 
-    private static final BeanProcessor beanProc = new BeanProcessor();
+    private static final BeanProcessor BEAN_PROCESSOR = new BeanProcessor();
 
     public void testCheckAnnotationOnMissingReadMethod() throws Exception {
         final String[] colNames = { "testField" };
         final ResultSetMetaData metaData = 
MockResultSetMetaData.create(colNames);
 
-        final String testField = "first";
-        final Object[][] rows = { new Object[] { testField } };
+        final String testFieldRowValues = "first";

Review Comment:
   @sanjanarampurkottur01 
   Wordiness not needed (IMO). 



##########
src/main/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java:
##########
@@ -92,12 +92,15 @@ public Object invoke(final Object proxy, final Method 
method, final Object[] arg
         Object result = method.invoke(this.resultSet, args);
 
         if (result instanceof String
-                && (method.getName().equals("getObject")
-                || method.getName().equals("getString"))) {
+                && isMethodNameValid(method.getName())) {
             result = ((String) result).trim();
         }
 
         return result;
     }
 
+    private boolean isMethodNameValid(String name) {

Review Comment:
   @sanjanarampurkottur01 
   Not needed.
   



##########
src/test/java/org/apache/commons/dbutils/BeanProcessorTest.java:
##########
@@ -186,19 +187,21 @@ public void setTestField(final int idx, final Integer 
testField) {
         }
     }
 
-    private static final BeanProcessor beanProc = new BeanProcessor();
+    private static final BeanProcessor BEAN_PROCESSOR = new BeanProcessor();
 
     public void testCheckAnnotationOnMissingReadMethod() throws Exception {
         final String[] colNames = { "testField" };
         final ResultSetMetaData metaData = 
MockResultSetMetaData.create(colNames);
 
-        final String testField = "first";
-        final Object[][] rows = { new Object[] { testField } };
+        final String testFieldRowValues = "first";
+        final Object[][] rows = {

Review Comment:
   Don't reformat the code, it makes the PR noisy and takes longer to review.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to