Hi all,
Just my �.02 on this ..
Jukka Zitting schrieb:
We already discussed one issue related to inline conditionals in
private. Checkstyle suggests to avoid all inline conditionals, but
especially in some equals() methods they are very handy.
I personally like inline conditionals very much because they look a lot
less cumbersome than the equivalent if-else statement.
Another, more essential issue is related to the use of protected member
variables. Checkstyle currently reports 161 protected member variables
in Jackrabbit. The canonical suggestion is to make the variables private
and provide accessor methods as needed. Should Jackrabbit follow this
guideline or should we simply disable the related Checkstyle check?
I would vote +1 for private fields with protected accessors. It provides
better encapsulation and future-proofness. Generally I like accessors a
lot more than public/protected fields.
There are also some isolated issues like equals() methods without
corresponding hashCode() methods and switch statements without default
cases that might cause unexpected trouble in some situations.
I would vote +1 for these to be fixed, especially the hashCode issues.
Regards,
Felix