Parameter matching has inconsistent treatment of case
------------------------------------------------------
Key: TAPESTRY-1659
URL: https://issues.apache.org/jira/browse/TAPESTRY-1659
Project: Tapestry
Issue Type: Bug
Components: Framework
Affects Versions: 4.1.2
Reporter: Patrick Moore
This problem occurs when matching template attributes to defined parameters.
Repro:
1) create a component that defines :
@Parameter(required=true)
public abstract String getEmail();
2) use this component and set the 'EMAIL' attribute to some non-literal value.
3) ComponentTemplateLoaderLogic.addTemplateBindings() calls
ComponentSpecification.getParameter() to determine if the attribute is a
parameter. Because getParameter() does a map.get() this is a case-sensitive
check and the parameter is not found.
4) However later on the ComponentTemplateLoaderLogic.addBinding()/validate()
calls ComponentSpecification.isReservedParameter() which does a case
insensitive check. This check finds the parameter, 'email' and an exception is
thrown.
I would propose that there be consistent treatment of case *or* the exception
message point out the difference in expected case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]