[ 
http://www.stripesframework.org/jira/browse/STS-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter closed STS-1.
------------------------


> OgnlActionBeanFinder NPE when adding Errors
> -------------------------------------------
>
>                 Key: STS-1
>                 URL: http://www.stripesframework.org/jira/browse/STS-1
>             Project: Stripes
>          Issue Type: Bug
>            Reporter: Greg Hinkle
>            Assignee: Tim Fennell
>
> Think I found a bug.
> I get a NPE in OgnlActionBeanBinder when it tries to assign a 
> preConversionValidationError to the fieldErrors map.
> You usually use the overridden put method that will create the list for a 
> field's errors but preConversion errors are added via get(parameter).addAll() 
> which will return null from get(parameter) unless there was an earlier 
> required  error.
> I added a putAll to add multiple errors on a field, but you might pass the 
> fieldErrors to the sub-methods and have them add one-by-one.
>       /**
>      * Add multiple errors for a particular field
>      * @param field
>      * @param errors
>      */
>     public void putAll(String field, List<ValidationError> errors) {
>         List<ValidationError> errorList = get(field);
>         if (errorList == null) {
>             errorList = new ArrayList<ValidationError>();
>             put(field,errors);
>         }
>         errorList.addAll(errors);
>     }

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

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to