You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/05/30 03:22:25 UTC

[Bug 53322] New: Odd decapitalization when matching setter name with injection-target-name directive

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


[Bug 53322] Odd decapitalization when inferring JavaBean property from setter name for an injection target

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53322

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> ---
Fixed in trunk and 7.0 by r1344068 and r1344071 and will be in 7.0.28.

-- 
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


[Bug 53322] Odd decapitalization when inferring JavaBean property from setter name for an injection target

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53322

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Odd decapitalization when   |Odd decapitalization when
                   |matching setter name with   |inferring JavaBean property
                   |injection-target-name       |from setter name for an
                   |directive                   |injection target

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
Corrected Summary. There are several places in the code where this conversion
is used.

-- 
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