cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessio Soldano <asold...@redhat.com>
Subject Re: cxf git commit: Minor change
Date Tue, 03 Mar 2015 16:13:42 GMT
Cool, thanks.

On 03/03/15 16:30, Colm O hEigeartaigh wrote:
> Hi Alessio,
>
> I switched to LinkedList here simply because we always prepend to the list,
> so in theory it has a O(1) insertion cost instead of O(n). In practise the
> list will be so small that it won't really matter much either way.
>
> Colm.
>
> On Tue, Mar 3, 2015 at 3:15 PM, Alessio Soldano <asoldano@redhat.com> wrote:
>
>> Hi Colm,
>> I assume you've been doing some kind of memory analysis that led to these
>> changes of ArrayList into LinkedList instances, did you? If that's the
>> case, do you have any number to share and/or are planning to blog on this?
>> Or are these simply spot changes for lists that are know to contain one or
>> two elements in most of the cases, etc ?
>> Cheers
>> Alessio
>>
>> On 03/03/15 15:31, coheigea@apache.org wrote:
>>
>>> Repository: cxf
>>> Updated Branches:
>>>     refs/heads/opensaml-3.0-port 773722540 -> 9ae69b3b3
>>>
>>>
>>> Minor change
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
>>> Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9ae69b3b
>>> Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9ae69b3b
>>> Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9ae69b3b
>>>
>>> Branch: refs/heads/opensaml-3.0-port
>>> Commit: 9ae69b3b323f48de033f62be9fc2780f11b0c761
>>> Parents: 7737225
>>> Author: Colm O hEigeartaigh <coheigea@apache.org>
>>> Authored: Tue Mar 3 14:31:39 2015 +0000
>>> Committer: Colm O hEigeartaigh <coheigea@apache.org>
>>> Committed: Tue Mar 3 14:31:39 2015 +0000
>>>
>>> ----------------------------------------------------------------------
>>>    .../java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java | 3
>>> ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/cxf/blob/9ae69b3b/
>>> rt/ws/security/src/main/java/org/apache/cxf/ws/security/
>>> wss4j/WSS4JInInterceptor.java
>>> ----------------------------------------------------------------------
>>> diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/
>>> security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/
>>> java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
>>> index 4e20831..79cb6da 100644
>>> --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/
>>> WSS4JInInterceptor.java
>>> +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/
>>> WSS4JInInterceptor.java
>>> @@ -26,6 +26,7 @@ import java.security.cert.Certificate;
>>>    import java.security.cert.X509Certificate;
>>>    import java.util.ArrayList;
>>>    import java.util.HashMap;
>>> +import java.util.LinkedList;
>>>    import java.util.List;
>>>    import java.util.Map;
>>>    import java.util.Set;
>>> @@ -541,7 +542,7 @@ public class WSS4JInInterceptor extends
>>> AbstractWSS4JInterceptor {
>>>             */
>>>            List<WSHandlerResult> results = CastUtils.cast((List<?>)msg.
>>> get(WSHandlerConstants.RECV_RESULTS));
>>>            if (results == null) {
>>> -            results = new ArrayList<WSHandlerResult>();
>>> +            results = new LinkedList<WSHandlerResult>();
>>>                msg.put(WSHandlerConstants.RECV_RESULTS, results);
>>>            }
>>>            WSHandlerResult rResult = new WSHandlerResult(actor, wsResult);
>>>
>>>
>> --
>> Alessio Soldano
>> Web Service Lead, JBoss
>>
>>
>


-- 
Alessio Soldano
Web Service Lead, JBoss


Mime
View raw message