[ 
https://issues.apache.org/jira/browse/PIVOT-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477659#comment-13477659
 ] 

Steven Swor edited comment on PIVOT-558 at 10/17/12 6:36 AM:
-------------------------------------------------------------

This definitely has value for an application developer. It's one line of code 
to maintain versus three, for every time the developer needs the semantics of 
putAll.  That can add up very quickly, and moving that kind of work into a 
single API call makes the application code much easier to read.

At the very least, the putAll method without the ignoreErrors flag should go 
into the Map interface.  I don't see a problem with adding the one with 
ignoreErrors on BeanAdapter (or in a separate utility class)
                
      was (Author: sworisbreathing):
    This definitely has value for an application developer. It's one line of 
code to maintain versus three, for every time the developer needs the semantics 
of putAll.  That can add up very quickly, and moving that kind of work into a 
single API call makes the application code much easier to read.
                  
> BeanAdapter should have a putAll method to allow multiple property set in one 
> method call...especially useful when setting properties from a JSON string
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-558
>                 URL: https://issues.apache.org/jira/browse/PIVOT-558
>             Project: Pivot
>          Issue Type: Improvement
>          Components: core-beans
>            Reporter: Appddevvv
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.1
>
>
> API:
> public void putAll(Map<String, ?> values)
> public boolean putAll(Map<String, ?> values, boolean ignoreErrors)
> where ignore errors indicates that any errors/exceptions thrown should be 
> caught. If any are thrown or errors occur, true is returned, otherwise false.
> I'll submit a patch if you accept this improvement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to