Pedro Santos commented on WICKET-4008:

Hi [~mgrigorov], 

I agree that shouldParsePropertyExpressionsWithSpaceInMethod should pass and 
that the exception message when parsing "per son" was misleading, thanks.

I added the failing test shouldParsePropertyExpressionStartingWithDigits 
because one can have getter/setters for a property starting with a digit even 
though it isn't a valid java identifier. My idea is to break the "property" in 
the grammar into multiple production rules. So: "bean.1property" will be a 
valid expression having a "bean property" but "bean.1property()" will fail.

Proposed grammar: 

 bean property                  = property name, [ index ]
 java property                  = java identifier , [ index | method sign ]
 map property                   = index
 property expression    = [ bean property | java property | map property ], { 
"." , property expression }

> Improve PropertyResolver to use a parser
> ----------------------------------------
>                 Key: WICKET-4008
>                 URL: https://issues.apache.org/jira/browse/WICKET-4008
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0-beta1
>            Reporter: Pedro Santos
>            Assignee: Pedro Santos
>            Priority: Trivial
>         Attachments: WICKET-4004.patch
> The usage of a parser is a improvement since it will be able to feedback 
> erroneous property expressions with meaningful exception messages.

This message was sent by Atlassian JIRA

Reply via email to