2012/6/2 <ma...@apache.org>: > Author: markt > Date: Fri Jun 1 22:03:10 2012 > New Revision: 1345367 > > URL: http://svn.apache.org/viewvc?rev=1345367&view=rev > Log: > Refactor some duplicate code into an new utility class with an eye to the > proposed patch for BZ 53333 > > Added: > tomcat/trunk/java/org/apache/catalina/util/Introspection.java (with > props) > Modified: > tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java > tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties > tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java > tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties > tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java > tomcat/trunk/java/org/apache/catalina/util/LocalStrings.properties >
> - if (injections != null && > methodName.startsWith("set") > - && methodName.length() > 3 > - && method.getParameterTypes().length == 1 > - && > method.getReturnType().getName().equals("void")) { > - String fieldName = getName(method); > + if (injections != null && > + Introspection.isValidSetter(method)) { > + String fieldName = Introspection.getName(method); If the "getName()" method was moved into utility class, maybe rename it to something more specific? "getFieldName()" ? "getSetterFieldName()" ? This method creates field name from the name of a setter method. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org