admin@glassfish.java.net

Re: code review for issue 694

From: Byron Nevins <Byron.Nevins_at_Sun.COM>
Date: Thu, 21 Sep 2006 22:59:48 -0700

I would wager that there /are/ no subclasses in other packages. If so,
this is a case where adding "protected" made maintenance harder and more
expensive.

Ref: http://blogs.sun.com/foo/entry/questionable_use_of_protected_in


Bill Shannon wrote:
> Byron Nevins wrote:
>> * It's too bad that the chmod method is declared as protected
>> rather than as nothing (package-private). If it was -- you could
>> just change the caller code (3 places in the package) to pass in
>> an array of args instead of doing all of that painful
>> processing. But, since it is protected there could be another
>> caller of the
>> chmod anywhere in the other millions of lines of code, so forget
>> this idea! Moral for interested readers: don't use protected
>> unless it is necessary.
>
> Can't you find all the subclasses and fix them as necessary?
> This isn't a public API, right?
>
> Or, if you're really paranoid, add another chmod method that
> takes the arg array and change the callers to use it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>