commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesper de Jong <jes...@yahoo.com>
Subject Re: [VOTE] (re-vote) XxxUtils constructors
Date Sun, 18 Aug 2002 19:07:22 GMT
...
> "use protected constructors for static utility
> classes"
> [  ] +1   I agree
> [  ]  0   I don't like it, but could live with it
> [XX] -1   I disagree

Static utility classes should not be instantiated.
Adding protected constructors is a hack for the other
projects which didn't use the utility classes in the
first place. Those other projects can easily solve
their problem by writing wrapper classes that call the
real static utility class. Such a wrapper class does
not need to subclass the static utility class so a
protected constructor is not necessary.

> "use deprecated public constructors for static
> utility classes"
> [  ] +1   I agree
> [XX]  0   I don't like it, but could live with it
> [  ] -1   I disagree

If it's really not possible for those other projects
to write simple wrapper classes, the existing public
constructors should be made deprecated, so that it is
clear for all future users that you shouldn't
instantiate the class. This solution has the least
impact for the dependent projects, because the
interface of the utility classes doesn't change.

Jesper de Jong
jespdj@yahoo.com



__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message