You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "garydgregory (via GitHub)" <gi...@apache.org> on 2023/12/03 20:42:59 UTC
Re: [PR] Resolving a few implementation smells using respective Refactoring Techniques [commons-dbutils]
garydgregory commented on code in PR #218:
URL: https://github.com/apache/commons-dbutils/pull/218#discussion_r1413204174
##########
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:
Still not needed, remove please.
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org