james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: svn commit: r413135 -/james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractNetworkMatcher.java
Date Sat, 10 Jun 2006 12:39:41 GMT
IMO private setters are not useful.
We should use protected or public setters if this helps in the tests and 
if this helps for the "pojoification":
http://issues.apache.org/jira/browse/JAMES-494

Stefano

Norman Maurer wrote:
> Am Freitag, den 09.06.2006, 22:05 +0100 schrieb Steve Brewin:
>> Noel J. Bergman wrote:
>>>
>>> Norman Maurer wrote:
>>>
>>>>>> - Add [protected] set methods for ServiceManager and DNSServer
>>>>> Those properties were private, and you've now exposed setters
>>>> i make a mistake
>>> :-)  No problem.  So this was just a style change, not a
>>> planned change in
>>> function?  You prefer to use a private setter rather than an
>>> assignment, and
>>> hope that the call overhead gets optimized out by the
>>> compiler?  Not that it
>>> matters much in an init() method.  :-)
>> Most compilers don't optimize this out, but the JVMs do.
>>
>> To prove the first, decompile your bytecode and see if the methods which
>> invoke the setter method still do.
>>
>> To prove the latter, read the many papers on JVM optimizations, or more
>> pragmattically test it by measuring the releveant performance of each
>> approach over several iterations.
>>
>> Optimizing out trivial assertions is one of the most basic tuneups a modern
>> JVM does. Its true that this may not happen on the first reference and the
>> optimization will inevitably consume processor time. But its a neglible cost
>> for good style.
>>
>> -- Steve
> 
> For me its just a "style change". Anyway if someone not like it i revert
> it. But for me its "cleaner".
> 
> Bye
> Norman
> 



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


Mime
View raw message