cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Gianni (JIRA)" <j...@apache.org>
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
    [ http://issues.apache.org/jira/browse/COCOON-1844?page=comments#action_12378004 ] 

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: http://issues.apache.org/jira/browse/COCOON-1844
>      Project: Cocoon
>         Type: Bug

>   Components: Blocks: Forms
>     Versions: 2.1.9
>     Reporter: Dewi Roberts
>     Assignee: Simone Gianni
>     Priority: Minor
>  Attachments: FormattingDecimalConvertor.java.diff
>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message