You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/09/01 16:55:45 UTC
[jira] [Assigned] (TAP5-2495) NullPointerException in
EnumSelectModel for invalid PropertyModel
[ https://issues.apache.org/jira/browse/TAP5-2495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Kemnade reassigned TAP5-2495:
------------------------------------
Assignee: Jochen Kemnade
> NullPointerException in EnumSelectModel for invalid PropertyModel
> -----------------------------------------------------------------
>
> Key: TAP5-2495
> URL: https://issues.apache.org/jira/browse/TAP5-2495
> Project: Tapestry 5
> Issue Type: Bug
> Reporter: Jochen Kemnade
> Assignee: Jochen Kemnade
>
> This can be reproduced with the following code snippet:
> {code}
> Class c = String.class;
> new EnumSelectModel(c, new MapMessages(Locale.US, Collections.emptyMap()));
> {code}
> It happens in {{org.apache.tapestry5.corelib.pages.PropertyEditBlocks.getSelectModelForProperty()}} if a {{PropertyModel}} has an {{enum}} datatype but the {{PropertyConduit}} returns a non-enum class from its {{getPropertyType()}} method.
> Of course, that's a user error, but we should be nice and report a better exception.
> There should be checks in {{EnumSelectModel}} as well as in {{PropertyEditBlocks}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)