[ 
https://issues.apache.org/jira/browse/WICKET-3934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Király updated WICKET-3934:
----------------------------------

    Attachment: WICKET-3934.patch

Wicket could use enums instead of strings to mark special attribute values. 
Attaching a patch to show what I mean.

Imho in the current implementation the test 
o.a.w.AttributeModifierTest.appendSpecialAttribute() is not correct because it 
uses the special string "VA_REMOVE" as attribute name but that marker is not 
compared to the attribute name but to the attribute value in 
o.a.w.AttributeModifier.replaceAttributeValue(Component, ComponentTag).

> Provide AttributeModifier#remove(String)
> ----------------------------------------
>
>                 Key: WICKET-3934
>                 URL: https://issues.apache.org/jira/browse/WICKET-3934
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket-core
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC6
>
>         Attachments: WICKET-3934.patch
>
>
> Please provide AttributeModifier#remove(String) method which deals with the 
> internals in AttributeModifier.
> AttributeModifier has special constants : VALUELESS_ATTRIBUTE_ADD and 
> VALUELESS_ATTRIBUTE_REMOVE which are checked with String#equals(). This 
> disallows to set an attribute with their value. It will be better if they are 
> created with 'new String(...)' and later checked by identity. They are static 
> so there is no chance to be interned during deserialization.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to