tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53322] New: Odd decapitalization when matching setter name with injection-target-name directive
Date Wed, 30 May 2012 01:22:25 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53322

          Priority: P2
            Bug ID: 53322
          Assignee: dev@tomcat.apache.org
           Summary: Odd decapitalization when matching setter name with
                    injection-target-name directive
          Severity: normal
    Classification: Unclassified
                OS: Windows XP
          Reporter: knst.kolinko@gmail.com
          Hardware: PC
            Status: NEW
           Version: 7.0.27
         Component: Catalina
           Product: Tomcat 7

There is code in DefaultInstanceManager class that converts a setter method
name into JavaBean property name.

The code is wrong: it removes "set" prefix and then converts the first
character into lowercase. That is a wrong way to get JavaBeans property name.

The correct way would be to follow JavaBeans specification 1.01 ch.8.8 [1] and
use java.beans.Introspector#decapitalize(String) method.

E.g. for method setURL(..) the correct property name would be "URL", not "uRL".


[1]
http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message