cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Gianni (JIRA)" <>
Subject [jira] Commented: (COCOON-1844) NPE caused by integer fields which have an <fd:initial-value> but no locale attribute
Date Fri, 05 May 2006 11:02:28 GMT
    [ ] 

Simone Gianni commented on COCOON-1844:

Yep, the problem is there, but unfortunately the given patch only solves the problem for a
decimal datatype, with no variant specified.

Maybe the right way of doing it is to use the default (system) locale in o.a.c.forms.formmodel.AbstractDatatypeWidgetDefinitionBuilder.setupDefinition()
on line 71, and have the convertor always expect a Locale being passed in.

> NPE caused by integer fields which have an <fd:initial-value> but no locale attribute
> -------------------------------------------------------------------------------------
>          Key: COCOON-1844
>          URL:
>      Project: Cocoon
>         Type: Bug

>   Components: Blocks: Forms
>     Versions: 2.1.9
>     Reporter: Dewi Roberts
>     Assignee: Simone Gianni
>     Priority: Minor
>  Attachments:
> A NullPointerException is thrown when setting an initial value to a field of integer
datatype without also specifying a locale, but the documentation states that the locale attribute
is optional.  The problem is caused when NumberFormat.getNumberInstance(locale) is passed
null instead of using the NumberFormat.getNumberInstance() method in FormattingDecimalConvertor.
> This problem might also affect number, currency and percent datatypes.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message