You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2007/11/09 23:33:50 UTC
Re: svn commit: r593444 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/ws/addressing/ rt/core/src/main/java/org/apache/cxf/interceptor/ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ systests/src/test/java/org/apache/cxf/systest/ws/add...
On Friday 09 November 2007, Glen Mazza wrote:
> Am Freitag, den 09.11.2007, 07:48 +0000 schrieb mmao@apache.org:
> > private int limit = 100 * 1024;
> > + private boolean enabled;
>
> While it may be that "enabled" will be false by default, it is usually
> better for readability to initialize that explicitly. The reader is
> never sure if "false" was the coder's intent, or that they simply
> forgot to initialize this variable.
The PMD rules will prevent that. Initializing values to the default
values just wastes processor time at construction time.
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog
Re: svn commit: r593444 - in /incubator/cxf/trunk:
api/src/main/java/org/apache/cxf/ws/addressing/
rt/core/src/main/java/org/apache/cxf/interceptor/
rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/
systests/src/test/java/org/apache/cxf/systest/ws/add...
Posted by Glen Mazza <gl...@verizon.net>.
I see: http://www.javapractices.com/Topic14.cjp. Never mind.
Glen
Am Freitag, den 09.11.2007, 17:33 -0500 schrieb Daniel Kulp:
> On Friday 09 November 2007, Glen Mazza wrote:
> > Am Freitag, den 09.11.2007, 07:48 +0000 schrieb mmao@apache.org:
> > > private int limit = 100 * 1024;
> > > + private boolean enabled;
> >
> > While it may be that "enabled" will be false by default, it is usually
> > better for readability to initialize that explicitly. The reader is
> > never sure if "false" was the coder's intent, or that they simply
> > forgot to initialize this variable.
>
> The PMD rules will prevent that. Initializing values to the default
> values just wastes processor time at construction time.
>
>