commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram (JIRA)" <>
Subject [jira] Created: (JXPATH-146) JavaBean XPath with uppercase initial characters
Date Fri, 26 Mar 2010 06:18:27 GMT
JavaBean XPath with uppercase initial characters

                 Key: JXPATH-146
             Project: Commons JXPath
          Issue Type: Improvement
    Affects Versions: 1.3
            Reporter: Ram
            Priority: Minor

XPath expressions executed against a JavaBean only work when the initial character is lower

 context.getValue("firstName")   //works
 context.getValue("FirstName")   //doesn't work

The code internally is looking at PropertyDescriptors and these start with lower case as per
the JavaBean spec.

I will be nice if both versions work ( just like 'firstName' and '@firstName' work even though
JavaBeans don't differentiate attributes vs elements).

The fix may be simple as converting the initial character to lower case before the PropertyDescriptor
lookup. Haven't looked at the impacts in detail though.

Thoughts ?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message