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

Greg Brown commented on PIVOT-558:
----------------------------------

I know the JDK's Map classes provide this, but it is so easy to do in 
application code that I have been reluctant to add it to Pivot's collections:

for (String key : source) {
    destination.put(key, source.get(key));
}

To me, the need for an ignoreErrors flag makes for an even a stronger argument 
that this type of code belongs at the application level, since that seems like 
a pretty application-specific requirement. 

If we were to provide such a feature in the framework, I would want to put it 
in a static method in a static Map.Util class or something similar so all maps 
could take advantage of it. However, I'm not recommending either approach 
because I don't think it adds sufficient value.


> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to