commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <brit...@apache.org>
Subject Re: [FILEUPLOAD] Package protected classes have public methods - make these package protected?
Date Mon, 18 Mar 2013 10:28:33 GMT
2013/3/18 sebb <sebbaz@gmail.com>

> On 18 March 2013 10:07, Benedikt Ritter <britter@apache.org> wrote:
> > 2013/3/18 sebb <sebbaz@gmail.com>
> >
> >> The new utils.mime classes for MIME decoding are mostly
> package-protected.
> >>
> >> However, they have public methods (and ctors) which is a bit misleading.
> >>
> >> I think it would make sense to reduce the visibility to package
> protected.
> >>
> >> Any objections?
> >>
> >
> > I personally don't align visibility of methods to the defining classes
> > visibility. If you decide to change the classes visibility to public you
> > will have to go though all methods and change method visibility too...
>
> Well yes, of course.
> But these classes are specifically for internal use only.
>
> Also I think objects should be created with the minimum visibility
> required.
> If it turns out more visibility is needed, it can be changed without
> causing incompatibility.
> Reducing visibility after release is not so easy.
>

In any case the person who changes visibility has to review to class
changed.
I'm indifferent in this case. If we decide to make methods (and ctors) of
package private classes also package private, we should document this at
http://wiki.apache.org/commons/CodeStyle so it doesn't get lost in the mail
archives.

Benedikt


>
> > Benedikt
> >
> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > http://people.apache.org/~britter/
> > http://www.systemoutprintln.de/
> > http://twitter.com/BenediktRitter
> > http://github.com/britter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message