Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EACB99022 for ; Sun, 3 Jun 2012 21:49:43 +0000 (UTC) Received: (qmail 72208 invoked by uid 500); 3 Jun 2012 21:49:43 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 72130 invoked by uid 500); 3 Jun 2012 21:49:43 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 72121 invoked by uid 99); 3 Jun 2012 21:49:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 21:49:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 21:49:35 +0000 Received: by dadv2 with SMTP id v2so5560471dad.18 for ; Sun, 03 Jun 2012 14:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=6DlHwNs6Ul4RHmEiOd2qI9hz7+A7nyNadT9owrRFMWk=; b=ohXTA8HKJvLuXFrpv925lc71Q2PkFj3oAIM7XcX0fKJlm91YwMRlQOLkg8J0pL2f0H G/Ky7y3CGsEglw294SME3eN7Lpq0TLl26PjDzmE5uZhZDOoGgFOm9D15emdJ0y3rAEWq 3O8iJNQD/qPOSOPLdRxccg6YM63BF9PuqtC/sjnhdQCDJB81wL5oSC1y3Y0Lm2FTOuJc 9E5dQpKlmjWoNvqIPa8zN4aRlt/m4/dNiSQj8WfR0pHgSjiDt5iNPmJoZKTSjRdSDLs/ QYfk/4OG48gQcWQaUUInZudtbFpKvF6oOjgYcOL4xO56SqqvuY4PFvPO6WC9DwpuA5AK Q0Qg== MIME-Version: 1.0 Received: by 10.68.202.234 with SMTP id kl10mr33525013pbc.108.1338760154119; Sun, 03 Jun 2012 14:49:14 -0700 (PDT) Received: by 10.68.72.130 with HTTP; Sun, 3 Jun 2012 14:49:14 -0700 (PDT) In-Reply-To: <20120601220311.C7DD0238897A@eris.apache.org> References: <20120601220311.C7DD0238897A@eris.apache.org> Date: Mon, 4 Jun 2012 01:49:14 +0400 Message-ID: Subject: Re: svn commit: r1345367 - in /tomcat/trunk/java/org/apache/catalina: core/ startup/ util/ From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2012/6/2 : > Author: markt > Date: Fri Jun =A01 22:03:10 2012 > New Revision: 1345367 > > URL: http://svn.apache.org/viewvc?rev=3D1345367&view=3Drev > Log: > Refactor some duplicate code into an new utility class with an eye to the= proposed patch for BZ 53333 > > Added: > =A0 =A0tomcat/trunk/java/org/apache/catalina/util/Introspection.java =A0 = (with props) > Modified: > =A0 =A0tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.= java > =A0 =A0tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties > =A0 =A0tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java > =A0 =A0tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.propert= ies > =A0 =A0tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.jav= a > =A0 =A0tomcat/trunk/java/org/apache/catalina/util/LocalStrings.properties > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (injections !=3D null= && methodName.startsWith("set") > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& metho= dName.length() > 3 > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& metho= d.getParameterTypes().length =3D=3D 1 > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& metho= d.getReturnType().getName().equals("void")) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String fieldName= =3D getName(method); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (injections !=3D null= && > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Introspe= ction.isValidSetter(method)) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String fieldName= =3D 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-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org