You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Thilina Gunarathne <cs...@gmail.com> on 2007/06/18 11:28:12 UTC

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

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...

Thanks,
Thilina

-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


[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

Posted by Glen Daniels <gl...@thoughtcraft.com>.
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).

--Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org