commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: StringUtils constructor is private
Date Mon, 12 Aug 2002 09:07:14 GMT

It must not be a problem to add instance variable and to depricate public
constuctor,
it is not the best way to "remove" something if code has users.

----- Original Message -----
From: "Stephen Colebourne" <scolebourne@btopenworld.com>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Monday, August 12, 2002 10:18 AM
Subject: Re: StringUtils constructor is private


> >From what little I know about velocity I think I see the problem.
Velocity
> needs an object to make method calls against. StringUtils can't be an
> object. Hence the problem.
>
> However, really this is a Velocity issue, not a commons one. Its a general
> principle that all static utility classes (ie. those with only static
> methods) should have a private constructor. We don't want people creating
> instances, because they are not objects merely a convenient groupings of
> methods. If Velocity can't handle that it excludes virtually every static
> utility class.
>
> But given Velocity is broken, I suppose we have to do something. Either a
> public constructor or a public static final instance variable 'INSTANCE'
> would do. But I hate the very thought of it. And it affects all of
> [collections], [pattern and [lang].
>
> Stephen
>
> ----- Original Message -----
> From: "Henri Yandell" <bayard@generationjava.com>
> To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
> Sent: Monday, August 12, 2002 6:44 AM
> Subject: Re: StringUtils constructor is private
>
>
> >
> > I don't see many reasons why not. I should be able to easily sneak out a
> > replacement jar for the beta without making a song and dance about it,
> > it's not something that will break on anyone.
> >
> > A bigger question, is why does it break things? I'm not a proponent of
> > privatising constructors without something to protect so am the easiest
> > person to convince, however if there's some kind of common tool which
can
> > only handle instance methods [and statics by pretending they're
instance]
> > then we should modify all Utils to have constructors unless absolutely
> > necessary.
> >
> > Is it a velocity thing?
> >
> > Hen
> >
> > On 11 Aug 2002, Jason van Zyl wrote:
> >
> > > Hi,
> > >
> > > Can this be made public again? I upgrade a ton of things in Maven to
use
> > > the b1 and it broke things all over the place. I have used
> > > StringUtils/Strings for a long time a tool inside a velocity context
and
> > > the private constructor puts a bit of a damper on this. Can we make
this
> > > public again?
> > >
> > > --
> > > jvz.
> > >
> > > Jason van Zyl
> > > jason@apache.org
> > > http://tambora.zenplex.org
> > >
> > > In short, man creates for himself a new religion of a rational
> > > and technical order to justify his work and to be justified in it.
> > >
> > >   -- Jacques Ellul, The Technological Society
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>


--
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