Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 96000 invoked from network); 12 Aug 2002 21:37:54 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Aug 2002 21:37:54 -0000 Received: (qmail 8354 invoked by uid 97); 12 Aug 2002 21:38:22 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 8303 invoked by uid 97); 12 Aug 2002 21:38:21 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 8291 invoked by uid 98); 12 Aug 2002 21:38:21 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: From: "Jack, Paul" To: 'Jakarta Commons Developers List' Subject: RE: [lang][collections] Utils having a public constructor Date: Mon, 12 Aug 2002 14:37:37 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > > Actually, I've been thinking for a while now that I'd like to see > > the utility constructors in [collections] be, at least, protected. > > +1 Paul, my thoughts exactly. Well, not exactly. :) In my ideal universe, the protected constructors throw RuntimeExceptions. So you wouldn't actually be able to create an instance. Actually, even with a protected constructor, Class.newInstance() will still raise an IllegalAccessException and thus Velocity couldn't use it. I really do think Velocity should be modified to allow static invocations without an instance. There are other APIs not under our control that use private constructors for their utility classes: java.util.Collections java.util.Arrays java.nio.channel.Channels and so on. So I really do believe that Velocity would benefit more from allowing statics without instances, rather than having us change all the commons utility classes. But I'd still like to see protected constructors, it's a nice thing to do for users. -Paul -- To unsubscribe, e-mail: For additional commands, e-mail: