tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2495) NullPointerException in EnumSelectModel for invalid PropertyModel
Date Tue, 01 Sep 2015 14:58:45 GMT

    [ https://issues.apache.org/jira/browse/TAP5-2495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725505#comment-14725505

ASF subversion and git services commented on TAP5-2495:

Commit 40d8cb13de3b44345e2cbe3de84c61ed185a59fe in tapestry-5's branch refs/heads/master from
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=40d8cb1 ]

TAP5-2495: Report an error if an EnumSelectModel is created for property conduit that does
not return an enum type.

> 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

View raw message