Re: [lang] CharUtils.isAscii methods and CharSet, two issues

2004-03-11 Thread Todd V. Jonker
As is stands, isAsciiAlphaUpper follows DoTheSimplestThingThatCouldPossiblyWork but (perhaps) breaks OnceAndOnlyOnce. Still, I think the existing code is better. Such things tend to be called inside tight inner loops, and as such every bytecode counts. Your suggested rewrite adds no functional i

Re: DateUtils.equals(d1, d2)

2004-02-17 Thread Todd V. Jonker
Just checking instanceof Timestamp and JVM version concerns me, because it seems to assume that the driver is doing the right thing. I also have no idea how this really works for different drivers, thus my queasiness. I like your idea of calling getTime() and rounding to the second. That should

RE: [lang][proposal] SystemUtils property out of sync problem; add set methods.

2004-02-16 Thread Todd V. Jonker
What's wrong with the changes inlined below? > public void testJavaExtDirDoesNotExist() { > String saveJavaExtDirs = SystemUtils.JAVA_EXT_DIRS; > try { > String testJavaExtDirs = "..."; > System.setProperty("java.ext.dirs", testJavaExtDirs);

Re: [lang][proposal] SystemUtils property out of sync problem; add set methods.

2004-02-16 Thread Todd V. Jonker
Gary, Would it meet testing needs to add a reloadSystemProperties() method that test-code can call after tweaking things? It seems like that would make testing easy without cluttering SystemUtils with setters (that perhaps shouldn't be used otherwise). .T. On Fri, 13 Feb 2004 23:11:43 -, "

Re: [lang] split & join

2004-02-16 Thread Todd V. Jonker
> find a better name. What about divide(), break() or cut() ? > > Emmanuel Bourg -- Todd V. Jonker Conscious Code Ltd The Practice of Programming www.consciouscode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: DateUtils.equals(d1, d2)

2004-02-16 Thread Todd V. Jonker
gt; -- > Serge Knystautas > President > Lokitech >>> software . strategy . design >> http://www.lokitech.com > p. 301.656.5501 > e. [EMAIL PROTECTED] -- Todd V. Jonker Conscious Code Ltd The Practice of Programming www.consciouscode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [lang] i18n package proposal

2004-01-30 Thread Todd V. Jonker
exception. */ public String formatMessage(MessageFormat format); } This would provide an appropriate hook for the logging system to lookup the localized message and format it. .T. -- Todd V. Jonker Conscious Code Ltd Thoughtful Software D

Re: [lang] i18n package proposal

2004-01-30 Thread Todd V. Jonker
I don't think a library must bend over backwards to support the poor programming practices of its users. That kind of poor exception handling is a well-documented anti-pattern. In any case, it shouldn't be the exception's responsibility to locate resource bundles or message formats. How about so

RE: [lang] i18n package proposal

2004-01-30 Thread Todd V. Jonker
This case sounds like a contract violation on the part of the caller, so throwing IllegalArgumentException is entirely reasonable. In fact that's exactly what I advise for all caller-side contract violations. On Thu, 29 Jan 2004 14:17:46 -0500, "Inger, Matthew" <[EMAIL PROTECTED]> said: > I had a

RE: [Bug 22692] - StringUtils.split ignores empty items

2003-11-14 Thread Todd V. Jonker
Or just use lang.CharSet On Fri, 14 Nov 2003 16:58:45 -0500, "Inger, Matthew" <[EMAIL PROTECTED]> said: > What about an interface: > > public class DelimitedTokenizer { > >public static interface DelimiterSet { >public boolean isDelimiter(char c); >} > } > > and having the abil

RE: [vsf] WAS: [general] Zip file proxy?

2003-11-14 Thread Todd V. Jonker
I've done exactly this in Seedling (a HiveMind-ish application platform). My first attemp using java.io was exceptionally painful. It's currently implemented in via an abstraction layer called ConfigTree, from which you can get URLs, from which you can open a stream. Implementations of the Conf

RE: [vsf] WAS: [general] Zip file proxy?

2003-11-14 Thread Todd V. Jonker
Hi Gary, Aren't you concerned that your giant-pile-of-code will behave incorrectly due to the fact that a File embedded in a Zip can't implement most of the File API properly? For anything but the most trivial pile I'd be pretty worried about unintended, or even damaging, behavior. On Thu, 13 No

Re: [primitives] Object/JDK integration - was Proposed interface changes

2003-11-06 Thread Todd V. Jonker
I to preferring the sandbox's "IntCollection isa Collection" design. The primitive collections would be worth a *lot* less to me if I couldn't use them transparently in the rest of my standard collection code. Seems to me that the [primitives] collections should at least play nicely with everythi

RE: [Math] common-math and bloated 3rd party libraries

2003-11-05 Thread Todd V. Jonker
On Wed, 5 Nov 2003 06:54:14 -0800 (PST), "David Graham" <[EMAIL PROTECTED]> said: > Agreed, especially because Jakarta's mission is to create *server* > side libraries. [...] > The need to support 1.3 is diminishing over time. Java 1.4 is > available and runs well on all the major platforms I ca