tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53421] New: BeanELResolver's inner class BeanProperty throws incorrect message while PropertyNotFound
Date Fri, 15 Jun 2012 13:54:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53421

          Priority: P2
            Bug ID: 53421
          Assignee: dev@tomcat.apache.org
           Summary: BeanELResolver's inner class BeanProperty throws
                    incorrect message while PropertyNotFound
          Severity: normal
    Classification: Unclassified
          Reporter: zanyking@gmail.com
          Hardware: PC
            Status: NEW
           Version: trunk
         Component: Catalina
           Product: Tomcat 7

BeanELResolver's inner class BeanProperty(line: 264) has two methods (write,
read) that will throw PropertyNotFoundException. And there current
implementation are wrong:

  throw new PropertyNotFoundException(message(ctx,
                            "propertyNotWritable", new Object[] {
                                    type.getName(), descriptor.getName() }));

it should use owner.getName() instead of type.getName() because the assembled
message will be:

Property '[descriptor.getName()]' not readable on type [type.getName()]

Here the descriptor.getName() means the property name, type.getName() means the
property type's name and the owner.getName() means the property owner - bean's
type name.

Of course we developer would prefer to receive a message that tells us which
bean type doesn't contain such property because this is a
PropertyNotFoundException.

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