struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <>
Subject Re: use of private final vs. protected
Date Wed, 03 Jun 2009 15:15:52 GMT
I think it is a case of "one standard per developer" :). IMO "private"
and "final" should be used carefully in a framework, as people are
always doing things we didn't expect them to do. I have that problem
at work, where I have to "copy and paste reuse" code, because parts
that I need to overwrite are private for no reason.


On Wed, Jun 3, 2009 at 8:02 AM, Wes Wannemacher <> wrote:
> I am looking at subclassing JakartaMultiPartRequest and almost all of
> the members are 'private final', but they are Lists and Maps, so I am
> curious what the justification is... I want to subclass and get at the
> data, obviously I'd have to change the declarations to protected, but
> is final necessary? From what I can see, the only thing it guarantees
> is that with each instance of JakartaMultiPartRequest, the Lists or
> Maps will point to new instances. I guess what I'm wondering is if
> there is an intention to follow a coding standard or something that
> I'm missing because I don't see much point for these members to be
> private or final (especially since it makes it pretty much impossible
> for me to subclass it).
> -Wes
> --
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

"Hey you! Would you help me to carry the stone?" Pink Floyd

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message