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: zanyk...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to