[ 
https://issues.apache.org/jira/browse/WICKET-3651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026236#comment-13026236
 ] 

Attila Király commented on WICKET-3651:
---------------------------------------

That is true. As I see the extensibility is only really used with the Action 
class (and that works even after removing the EnumeratedType superclass). In 
the most cases extending do not make much sense as the code can only handle the 
predefined values anyways.

My other issue with EnumeratedType is that I do not really see the benefit of 
it extending StringValue. It seems this functionallity is not used.

Last but not least EnumeratedType stores the EnumeratedType instances in a 
static map and that is imho a memory leak possibility (if EnumeratedType and 
its subclasses are loaded by different class loaders).

> Replace EnumeratedType with java enum
> -------------------------------------
>
>                 Key: WICKET-3651
>                 URL: https://issues.apache.org/jira/browse/WICKET-3651
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core, wicket-examples, wicket-extensions
>    Affects Versions: 1.5-RC3
>            Reporter: Attila Király
>         Attachments: WICKET-3651.patch
>
>
> Most of the EnumeratedType subclasses in wicket can be replaced with Java 
> enums. The sole exception is the Action class, but the EnumeratedType 
> superclass is not needed there either.

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

Reply via email to