Hi all,
Not sure if this is part of coding conventions or an oversight:
I was looking through some of the files in intake/validator package and
noticed that some properties were being *initialised* to null and/or 0
twice! And that some objects were being initialised outside the constructor,
something I try my best to avoid!!
For example, in the DefaultValidator class the property maskString is
implicitly set to null on line 243 and explicitly set to null on line 294.
Same applies to all properties of this class and to numerous if not all
classes of this package. In my opinion this is unnecessary. Personally I do
try to explicitly set Strings to null but here it's being set twice.
Perl5 -matcher & compiler (lines 258 & 261) are being initialised outside
the Constructor, would it not be better to move them into the init method?
If there is no explicit reason for these I'll post patches to the relevant
files the coming day or two.
Colin
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
[Turbine-dev] IntakeService
| Tweet |
|
Search Discussions
Discussion Posts
Follow ups
- Quinton McCombs: -------------------------------------------- Quinton McCombs NequalsOne - HealthCare marketing tools mailto:qmccombs@NequalsOne.com http://www.NequalsOne.com I can't think of any good reason for this.... Please submit the patches! --------------------------------------------------------------------- To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
- Colin Chalmers: Hi all, Not sure if this is part of coding conventions or an oversight: I was looking through some of the files in intake/validator package and noticed that some properties were being *initialised* to null and/or 0 twice! And that some objects were being initialised outside the constructor, something I try my best to avoid!! For example, in the DefaultValidator class the property maskString is implicitly set to null on line 243 and explicitly set to null on line 294. Same applies to all
- Colin Chalmers: Hi all, Looking through the Intake/validator package I came across a few things which are not totally clear to me. 1. What's the difference between DefaultValidator & FileValidator? They look quite similiar to me. 2. Is there a need for both NumberValidator & IntegerValidator? 3. Shouldn't part of DefaultValidator actually be called StringValidator? New class decreasing size of DefaultValidator. 4. Should we be looking at deprecating NumberKeyValidator? Colin
Related Discussions
Discussion Overview
| group | dev
|
| categories | turbine |
| posted | Apr 22, '03 at 8:25p |
| active | Apr 23, '03 at 7:43p |
| posts | 7 |
| users | 3 |
| website | turbine.apache.org |
