axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <>
Subject [axis2] Re: svn commit: r547926 - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/rpc/receivers/ kernel/src/org/apache/axis2/ kernel/src/org/apache/axis2/addressing/ kernel/src/org/apache/axis2/context/ kernel/src/org/apache/axis2/deployme
Date Mon, 18 Jun 2007 21:40:01 GMT
Hi Thilina!

Thilina Gunarathne wrote:
> Hi Glen,
>> Author: gdaniels
>> Date: Sat Jun 16 07:21:09 2007
>> New Revision: 547926
>> -    public List getGlobalModules() {
>> -        return globalModuleList;
> Looks like you forgot  the @deprecated keyword..
> IMHO it would have been better if you *atleast* deprecate this, rather
> than removing this...

+1.  The problem with the method (as with many methods in 
AxisConfiguration, as it turns out) is that it was returning a mutable 
list.  This means other code aside from AxisConfiguration could add and 
delete things from the list, and those modifications may not keep to the 
invariants the class implies (i.e. don't add an Integer to a list of 
AxisModules).  Also multiple threads could keep references to the list 
and therefore put it into an inconsistent state.  Far better for the 
interface to protect against that kind of thing, which is why I added 
addGlobalModule(AxisModule) and removed getGlobalModules().  Sorry I did 
it a little swiftly.

How about if I put it back, but return a cloned copy of the list so 
modifying it does NOT affect the underlying AxisConfiguration?

We might also want to fix this up for the other lists we return (out 
phases, etc).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message