Re-cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources
[EMAIL PROTECTED] さんが、2003/11/29 11:45:05に送られた ---“cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources”によりますと jkeyes 2003/11/28 18:45:05 Log: cli2 WIP Status: Vendor Tag: OXSPRING Release Tags: CLI_WIP_2 N jakarta-commons/cli/src/java/org/apache/commons/cli2/Argument.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ArgumentBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ArgumentImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/BadPropertyException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/BurstException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Command.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandLine.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandLineParser.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Comparators.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/DefaultOption.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/DefaultOptionBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Group.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/GroupBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/GroupImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpFormatter.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpLine.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpSetting.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/MissingOptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/MissingValueException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Option.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/OptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/OptionImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Parent.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ParentImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/PatternBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/PropertyOption.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/SourceDestArgument.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/StringComparator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Switch.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/SwitchBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/UnexpectedOptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/UnexpectedValueException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/Defaults.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/DefaultsFactory.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/PreferencesImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/PropertiesImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/resources/ResourceHelper.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ClassValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/DateValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/EnumValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/FileValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/InvalidArgumentException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/NumberValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/UrlValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/Validator.java No conflicts created by this import - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -
Re-cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources
[EMAIL PROTECTED] さんが、2003/11/29 11:30:59に送られた ---“cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources”によりますと jkeyes 2003/11/28 18:30:59 Log: cli2 WIP Status: Vendor Tag: OXSPRING Release Tags: CLI_WIP_2 N jakarta-commons/cli/src/java/org/apache/commons/cli2/Argument.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ArgumentBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ArgumentImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/BadPropertyException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/BurstException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Command.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandLine.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandLineParser.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Comparators.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/DefaultOption.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/DefaultOptionBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Group.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/GroupBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/GroupImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpFormatter.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpLine.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpSetting.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/MissingOptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/MissingValueException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Option.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/OptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/OptionImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Parent.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ParentImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/PatternBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/PropertyOption.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/SourceDestArgument.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/StringComparator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Switch.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/SwitchBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/UnexpectedOptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/UnexpectedValueException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/Defaults.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/DefaultsFactory.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/PreferencesImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/PropertiesImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/resources/ResourceHelper.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ClassValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/DateValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/EnumValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/FileValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/InvalidArgumentException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/NumberValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/UrlValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/Validator.java No conflicts created by this import - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -
Re: Re-cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources
These source have been removed as the import went onto HEAD and not the branch I specified (see previous mail on cvs importing). As there was no question attached to these mails I guessed an answer. -John K On 2 Dec 2003, at 09:28, KANEUCHI Tetsuya wrote: [EMAIL PROTECTED] さんが、2003/11/29 11:30:59に送られた ---“cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources”によりますと jkeyes 2003/11/28 18:30:59 Log: cli2 WIP Status: Vendor Tag: OXSPRING Release Tags: CLI_WIP_2 N jakarta-commons/cli/src/java/org/apache/commons/cli2/Argument.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ ArgumentBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ ArgumentImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ BadPropertyException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ BurstException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Command.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ CommandBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/CommandLine.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ CommandLineParser.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Comparators.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ DefaultOption.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ DefaultOptionBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Group.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ GroupBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/GroupImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ HelpFormatter.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpLine.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/HelpSetting.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/ MissingOptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ MissingValueException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Option.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ OptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/OptionImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Parent.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ParentImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ PatternBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ PropertyOption.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ SourceDestArgument.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ StringComparator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/Switch.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ SwitchBuilder.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ UnexpectedOptionException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/ UnexpectedValueException.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/ Defaults.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/ DefaultsFactory.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/ MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/ MessagesBundle.properties N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/ PreferencesImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/defaults/impl/ PropertiesImpl.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/resources/ ResourceHelper.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ ClassValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ DateValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ EnumValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ FileValidator.java N jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/ InvalidArgumentException.java N
Re: Re-cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources
Dear commons-dev members: I have accientally sent some emails to this list. I'm really sorry. Please ignore them. From: KANEUCHI Tetsuya [EMAIL PROTECTED] Subject: Re-cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2 -Imported sources Date: Tue, 02 Dec 2003 18:28:20 +0900 (JST) -- T.Kaneuchi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25135] New: - The syntax error exists in the sample code of package-summary.html
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25135. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25135 The syntax error exists in the sample code of package-summary.html Summary: The syntax error exists in the sample code of package- summary.html Product: Commons Version: 1.0 Alpha Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Logging AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The syntax error exists in the sample code of package-summary.html. http://jakarta.apache.org/commons/logging/apidocs/org/apache/commons/logging/pac kage-summary.html A problem is in the contents of a Quick Start Guide section. Log log = LogFactory.getLog(this.class); this.class shold be this.getClass(), Foo.class or something else. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/builder ReflectionToStringBuilder.java
ggregory2003/12/02 11:11:58 Modified:lang/src/java/org/apache/commons/lang/builder ReflectionToStringBuilder.java Log: Add missing Javadoc tags. Revision ChangesPath 1.15 +6 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java Index: ReflectionToStringBuilder.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ReflectionToStringBuilder.java3 Nov 2003 00:21:19 - 1.14 +++ ReflectionToStringBuilder.java2 Dec 2003 19:11:58 - 1.15 @@ -564,9 +564,13 @@ /** * pCalls codejava.lang.reflect.Field.get(Object)/code./p * - * @see java.lang.reflect.Field#get(Object) + * @param field The Field to query. + * @return The Object from the given Field. + * * @throws IllegalArgumentException * @throws IllegalAccessException + * + * @see java.lang.reflect.Field#get(Object) */ protected Object getValue(Field field) throws IllegalArgumentException, IllegalAccessException { return field.get(this.getObject()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/example Shell.java
ggregory2003/12/02 11:22:56 Modified:vfs/src/java/org/apache/commons/vfs/example Shell.java Log: Add quit as a synonym for exit. Revision ChangesPath 1.6 +7 -3 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/example/Shell.java Index: Shell.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/example/Shell.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Shell.java28 Nov 2003 17:27:16 - 1.5 +++ Shell.java2 Dec 2003 19:22:56 - 1.6 @@ -80,6 +80,7 @@ */ public class Shell { +private static final String CVS_ID = $Id$; private final FileSystemManager mgr; private FileObject cwd; private BufferedReader reader; @@ -107,6 +108,7 @@ private void go() throws Exception { +System.out.println(VFS Shell [ + CVS_ID + ]); while ( true ) { final String[] cmd = nextCommand(); @@ -119,7 +121,7 @@ continue; } final String cmdName = cmd[ 0 ]; -if ( cmdName.equalsIgnoreCase( exit ) ) +if (cmdName.equalsIgnoreCase( exit ) || cmdName.equalsIgnoreCase( quit )) { return; } @@ -189,7 +191,9 @@ System.out.println( pwdDisplays current folder. ); System.out.println( rm path Deletes a file or folder. ); System.out.println( touch path Sets the last-modified time of a file. ); -} +System.out.println( exit Exits this program. ); +System.out.println( quit Exits this program. ); + } /** Does an 'rm' command. */ private void rm( final String[] cmd ) throws Exception - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE][RESULT] New committer - Neil O'Toole
On 2 Dec 2003, at 00:09, Noel J. Bergman wrote: robert burrell donkin wrote: Noel J. Bergman wrote: Well, it isn't as if the PMC has a shortage of ASF Members who can check. :-) Although it is clearly a non-optimal solution. the jakarta pmc has quite a shortage of ASF members who are active on the pmc list. (i hope that you'll remember this a little later :) That is quite a shame. to be fair, i think that things have started to turn round now. at the start of last month, i thought that the odds were against jakarta surviving for another year. i'm now more optimistic. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBUtils] Extending QueryLoader...
--- Hernan Silberman [EMAIL PROTECTED] wrote: Hello, I'm working on an application that uses Named Queries much like the DBUtils QueryLoader class reads in from a Java properties file. The queries in my application are stored in a relational database on the server side and I was hoping I could extend QueryLoader so it fetched the NAME/SQL pairs in an application-specific way, something like this: public synchronized Map load(DataSource aDS) throws IOException; public synchronized void unload(DataSource aDS); I'm new to DBUtils, and figured I'd ask before trying to extend this class in my code to accomodate something like the two methods above. Is this a sane thing to do? I won't get exactly what I want by extending this class, because I don't need the properties file versions of load and unload. Should I just create an alternate app-specific QueryLoader, or am I not seeing a better way of leveraging the existing QueryLoader class? QueryLoader isn't used by other DbUtils classes; it's just a standalone helper class that loads queries from properties files. So, you won't gain anything by subclassing it and replacing it with a DB lookup. David thanks... Hernan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [cache] Turning cache into a thin abstraction layer a la logging ?
Mainguy, Mike wrote: On this subject, most of the material I see on this topic deals with retrieving and storing info that is expensive to get somewhere else. Most of the solutions, however, also assume that it is acceptable that the object be removed from cache for whatever reason (time expired, memory low, whatever). It seems, however, that it is assumed the developer will code in a defensive manner such that, if the object has been removed from cache, they will recreate the object and put it back in there. Is this the way commons-cache is supposed to work? I think that's the way most caching systems work. The cache is passive and doesn't refresh objects on its own. I personally would rather have a caching mechanism that is transparent and I can have the objects be managed more hands off with a simple interface that tells the cache manager how to refresh the data on them. In my vision, I would create an instance of an object and I would add it to the cache manager. After that, I would retrieve the object from the cache manager and it I will automatically get a copy that was refreshed at the proper interval. (e.g. every 15 minutes). I see this object manager as a layer above the caching system. Emmanuel smime.p7s Description: S/MIME Cryptographic Signature
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar TarTestCase.java
dirkv 2003/12/02 12:35:05 Modified:compress/src/test/org/apache/commons/compress/tar TarTestCase.java Log: fix tar testcase - correct path - update *.tar binary files Revision ChangesPath 1.2 +2 -2 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/TarTestCase.java Index: TarTestCase.java === RCS file: /home/cvs/jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/TarTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TarTestCase.java 23 Nov 2003 20:07:47 - 1.1 +++ TarTestCase.java 2 Dec 2003 20:35:05 - 1.2 @@ -67,7 +67,7 @@ final int size = name.length(); final String filename = name.substring( 0, size - 11 ).replace( '.', SP ); -return target + SP + tests + SP + +return src + SP + test + SP + SP + filename + SP; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/zip AsiExtraFieldTestCase.java ExtraFieldUtilsTestCase.java ZipEntryTestCase.java ZipLongTestCase.java ZipShortTestCase.java
dirkv 2003/12/02 12:38:14 Modified:compress/src/test/org/apache/commons/compress/tar TarTestCase.java TarTestSuite.java compress/src/test/org/apache/commons/compress/zip AsiExtraFieldTestCase.java ExtraFieldUtilsTestCase.java ZipEntryTestCase.java ZipLongTestCase.java ZipShortTestCase.java Log: full license headers Revision ChangesPath 1.3 +59 -5 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/TarTestCase.java Index: TarTestCase.java === RCS file: /home/cvs/jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/TarTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TarTestCase.java 2 Dec 2003 20:35:05 - 1.2 +++ TarTestCase.java 2 Dec 2003 20:38:13 - 1.3 @@ -1,10 +1,64 @@ /* - * Copyright (C) The Apache Software Foundation. All rights reserved. + * $Header$ + * $Revision$ + * $Date$ + * + * + * + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in + *the documentation and/or other materials provided with the + *distribution. + * + * 3. The end-user documentation included with the redistribution, if + *any, must include the following acknowledgement: + * This product includes software developed by the + *Apache Software Foundation (http://www.apache.org/). + *Alternately, this acknowledgement may appear in the software itself, + *if and wherever such third-party acknowledgements normally appear. + * + * 4. The names The Jakarta Project, Commons, and Apache Software + *Foundation must not be used to endorse or promote products derived + *from this software without prior written permission. For written + *permission, please contact [EMAIL PROTECTED] + * + * 5. Products derived from this software may not be called Apache + *nor may Apache appear in their names without prior written + *permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * http://www.apache.org/. * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE.txt file. */ + package org.apache.commons.compress.tar; import java.io.BufferedInputStream; 1.2 +58 -4 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/TarTestSuite.java Index: TarTestSuite.java === RCS file: /home/cvs/jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/TarTestSuite.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TarTestSuite.java 23 Nov 2003 20:07:47 - 1.1 +++ TarTestSuite.java 2 Dec 2003 20:38:13 - 1.2 @@ -1,10 +1,64 @@ /* - * Copyright The Apache Software Foundation. All rights reserved. + * $Header$ + * $Revision$ + * $Date$ + * + *
cvs commit: jakarta-commons-sandbox/compress/src/java/org/apache/commons/compress/bzip2 - New directory
dirkv 2003/12/02 12:41:45 jakarta-commons-sandbox/compress/src/java/org/apache/commons/compress/bzip2 - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2 - New directory
dirkv 2003/12/02 12:43:29 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2 - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/test - New directory
dirkv 2003/12/02 12:43:39 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/test - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/example - New directory
dirkv 2003/12/02 12:43:43 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/example - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/test BzipTestCase.java
dirkv 2003/12/02 12:44:24 Added: compress/src/test/org/apache/commons/compress/bzip2/example Bzip2Compress.java Bzip2Uncompress.java compress/src/test/org/apache/commons/compress/bzip2/test BzipTestCase.java Log: move bzip2 tests to compress component Revision ChangesPath 1.1 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/example/Bzip2Compress.java Index: Bzip2Compress.java === /* * $Header: /home/cvs/jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/example/Bzip2Compress.java,v 1.1 2003/12/02 20:44:24 dirkv Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 20:44:24 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.compress.bzip2.example; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.apache.commons.compress.bzip2.CBZip2OutputStream; /** * This simple example shows how to use the Bzip2 classes to compress a file. * * @author a href=mailto:[EMAIL PROTECTED]Peter Donald/a * @version $Revision: 1.1 $ $Date: 2003/12/02 20:44:24 $ */ public class Bzip2Compress { public static void main( final String[] args ) throws Exception { if( 2 != args.length ) { System.out.println( java Bzip2Compress input output ); System.exit( 1 ); } final File source = new File( args[ 0 ] ); final File destination = new File( args[ 1 ] ); final CBZip2OutputStream output = new CBZip2OutputStream( new FileOutputStream( destination ) ); final FileInputStream input = new FileInputStream( source ); copy( input, output ); input.close(); output.close(); } /** * Copy bytes from an codeInputStream/code to an codeOutputStream/code. */ private static void copy( final InputStream input, final OutputStream
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/test asf-logo-huge.tar asf-logo-huge.tar.bz2
dirkv 2003/12/02 12:44:57 Added: compress/src/test/org/apache/commons/compress/bzip2/test asf-logo-huge.tar asf-logo-huge.tar.bz2 Log: test data Revision ChangesPath 1.1 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/test/asf-logo-huge.tar Binary file 1.1 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/bzip2/test/asf-logo-huge.tar.bz2 Binary file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress .cvsignore checkstyle.xml project.properties project.xml
dirkv 2003/12/02 13:05:13 Modified:compress project.xml Added: compress .cvsignore checkstyle.xml project.properties Log: mavenize project Revision ChangesPath 1.2 +53 -143 jakarta-commons-sandbox/compress/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons-sandbox/compress/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 23 Nov 2003 20:07:46 - 1.1 +++ project.xml 2 Dec 2003 21:05:12 - 1.2 @@ -1,147 +1,57 @@ ?xml version=1.0? project - -pomVersion3/pomVersion - -id${pom.groupId}-${pom.name}/id -namecompress/name -groupIdjakarta-commons/groupId - -currentVersionSNAPSHOT/currentVersion - -organization -nameApache Software Foundation/name -urlhttp://www.apache.org/url -logohttp://jakarta.apache.org/commons/images/jakarta-logo-blue.gif/logo -/organization - -inceptionYear2002/inceptionYear -packageorg.apache.commons.io/package -logo/images/logo.jpg/logo - -!-- Gump integration -- -gumpRepositoryIdjakarta-compress/gumpRepositoryId - -description -Commons.Compress is a sleeping component that contains Tar, Zip and -possibly at some point BZip2 packages. They were loitering in Commons-IO -and this is their new home. -/description - -shortDescriptionJava Common Compress Components/shortDescription - -urlhttp://jakarta.apache.org/commons/compress//url - -issueTrackingUrl -http://nagoya.apache.org:8080/scarab/servlet/scarab/ -/issueTrackingUrl - -siteAddressjakarta.apache.org/siteAddress -siteDirectory/www/jakarta.apache.org/commons/sandbox/compress//siteDirectory - -distributionDirectory -/www/jakarta.apache.org/builds/jakarta-commons-sandbox/compress/ -/distributionDirectory - -repository -connection -scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-commons-sandbox/io -/connection - -urlhttp://cvs.apache.org/viewcvs/jakarta-commons-sandbox/compress//url -/repository - -mailingLists -mailingList -nameCommons User List/name - -subscribe -[EMAIL PROTECTED] -/subscribe - -unsubscribe -[EMAIL PROTECTED] -/unsubscribe - -archive -http://nagoya.apache.org:8080/eyebrowse/[EMAIL PROTECTED] -/archive -/mailingList - -mailingList -nameCommons Developer List/name -subscribe[EMAIL PROTECTED]/subscribe -unsubscribe[EMAIL PROTECTED]/unsubscribe -archive -http://nagoya.apache.org:8080/eyebrowse/[EMAIL PROTECTED] -/archive -/mailingList -/mailingLists - -developers - -developer -!-- In that I moved them to their new location -- -nameHenri Yandell/name -idbayard/id -email[EMAIL PROTECTED]/email -organization/organization -roles -roleJava Developer/role -/roles -/developer - -/developers + extend../../jakarta-commons/xdocs/maven/project-base.xml/extend + nameCommons Compress/name + idcommons-compress/id + logo/images/compress-logo-blue.jpg/logo + urlhttp://jakarta.apache.org/commons/compress//url + inceptionYear2002/inceptionYear + shortDescriptionCommons Compress/shortDescription + description +Commons Compress is a component that contains Tar, Zip and BZip2 packages. + /description + + currentVersion0.1-dev/currentVersion + versions + /versions + branches + /branches + + developers +developer + !-- In that I moved them to their new location -- + nameHenri Yandell/name + idbayard/id + email[EMAIL PROTECTED]/email + organization/organization + roles +roleJava Developer/role + /roles +/developer +developer + nameDirk Verbeeck/name + iddirkv/id + email/email + organization/organization + roles +roleJava Developer/role + /roles +/developer + /developers -!-- Need to mark these as compile-time/run-time -- -dependencies -dependency -idjunit/id -version3.8.1/version -/dependency -/dependencies - -build -nagEmailAddress[EMAIL PROTECTED]/nagEmailAddress -sourceDirectorysrc/java/sourceDirectory -unitTestSourceDirectorysrc/test/unitTestSourceDirectory -
cvs commit: jakarta-commons-sandbox/compress README.txt
dirkv 2003/12/02 13:06:06 Removed: compress README.txt Log: move text to component website - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/xdocs - New directory
dirkv 2003/12/02 13:06:15 jakarta-commons-sandbox/compress/xdocs - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/xdocs downloads.xml index.xml navigation.xml
dirkv 2003/12/02 13:07:56 Added: compress/xdocs downloads.xml index.xml navigation.xml Log: compress website Revision ChangesPath 1.1 jakarta-commons-sandbox/compress/xdocs/downloads.xml Index: downloads.xml === ?xml version=1.0? document properties titleDownloads/title author email=[EMAIL PROTECTED]Commons Documentation Team/author revision$Id: downloads.xml,v 1.1 2003/12/02 21:07:56 dirkv Exp $/revision /properties body section name=Releases pThere are no releases available./p !-- pThe following releases are available:/p ul liVersion 1.1 - 20 October 2003/li liVersion 1.0 - 12 August 2002/li /ul br/ p The latest binary release is always available on the a href=http://jakarta.apache.org/site/binindex.cgi#commons-compress; Jakarta Binary Downloads page/a, its source is available from a href=http://jakarta.apache.org/site/sourceindex.cgi#commons-compress; Jakarta Source Downloads page/a. /p p Older releases are retained by the Apache Software Foundation but are moved into a a href=http://archive.apache.org/dist/jakarta/commons/compress/; special archive area/a. /p p a href=http://cvs.apache.org/builds/jakarta-commons/nightly/commons-compress/; Nightly source and binary drops/a are also available. /p -- p Access to the source tree to see the latest and greatest code is possible through a href=cvs-usage.htmlanonymous CVS access/a. /p /section !-- section name=Release Candidate p Release candidates for the upcoming 1.1 release can be downloaded a href=http://cvs.apache.org/~dirkv/builds/;here/a. /p p Please review and report any problem on the a href=mail-lists.htmlmailing list/a. /p p Final release target is 20 October 2003. /p /section -- /body /document 1.1 jakarta-commons-sandbox/compress/xdocs/index.xml Index: index.xml === ?xml version=1.0? document properties titleOverview/title author email=[EMAIL PROTECTED]Commons Documentation Team/author /properties body section name=The Compress Component pCommons Compress defines an API for working with tar, zip and bzip2 files./p pThe code in this component came from Avalon's Excalibur, but originally from Ant, as far as life in Apache goes. The tar package is originally Tim Endres' public domain package. The bzip2 package is based on the work done by Keiron Liddle. /p pthe migration has been:/p pAnt - Avalon-Excalibur - Commons-IO - Commons-Compress./p br/br/ /section section name=Releases p See the a href=downloads.htmldownloads/a page for information on obtaining releases. /p br/br/ /section section name=Documentation p The a href=apidocs/index.htmlJavaDoc API documents/a are available online. /p pThere are also 2 example for the bzip2 API:/p ul lia href=xref-test/org/apache/commons/compress/bzip2/example/Bzip2Compress.htmlBzip2Compress/a/li lia href=xref-test/org/apache/commons/compress/bzip2/example/Bzip2Uncompress.htmlBzip2UnCompress/a/li /ul /section /body /document 1.1 jakarta-commons-sandbox/compress/xdocs/navigation.xml Index: navigation.xml === ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE org.apache.commons.menus SYSTEM '../../../jakarta-commons/xdocs/stylesheets/menus/org-apache-commons-menus.dtd' project name=Commons Compress titleCommons Compress/title body top-menus; menu name=Commons#xA0;Compress item name=Overview href=/index.html / !--item name=Configuration href=/configuration.html / -- item name=API#xA0;Documentationhref=/apidocs/index.html/ !-- item name=Developers#xA0;Guide href=/guide/index.html collapse=true item name=Class#xA0;Diagrams href=/guide/classdiagrams.html/ item name=Sequence#xA0;Diagrams href=/guide/sequencediagrams.html/ /item -- item name=Downloads href=/downloads.html/ /menu bottom-menus; /body
Re: [collections] AMap/IterableMap name
There is no obvious 'standard' to follow here, other than adding '2' to the end (LayoutManager2). But even Sun tends to use descriptive alternate names a lot of the time (Map to replace Dictionary etc.) I'll probably change it to IterableMap unless anyone has better ideas. Stephen - Original Message - From: __matthewHawthorne [EMAIL PROTECTED] Stephen Colebourne wrote: I can think of various possible names: Map2 - follows Sun naming standards for replacing interfaces MapA - similar idea, but doesn't clash if Sun ever creates Map2 AMap - similar idea but reversed (A is for Apache) IMap - similar idea, but I is for interface IterableMap - the long name If people favour IterableMap, then thats fine. I was looking for something short to indicate that this should be a general replacement to using Map. Maybe IterableMap is clearer though Naming opinions please? I like IterableMap, but I can also see why you wanted a short name. What about XMap or MapX, to indicate a Map extension, like the javax.* packages? Similarly, HashMapX and XHashMap could be used instead of HashedMap. It's kind of a strange situation, but it would be nice to come up with a nice naming standard for classes which can replace their JDK counterparts. Any other suggestions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DbUtils]Making the BeanHandler... Even Smarter
One other note. I will be perfectly happy if we just make the mapColumnsToProperties() method protected. But I think it would be even better if we made it a public method in the ColumnProcessor interface. That way, the ColumnProcessor would completely encapsulate the mapping of both names and datatypes from ResultSet columns to JavaBean properties. In my opinion, that would be a cleaner separation of concerns. Thanks, Corby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar data.txt
dirkv 2003/12/02 13:33:40 Modified:compress/src/test/org/apache/commons/compress/tar data.txt Log: make data.txt binary (file size should be 666) Revision ChangesPath 1.2 +14 -14 jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/data.txt Index: data.txt === RCS file: /home/cvs/jakarta-commons-sandbox/compress/src/test/org/apache/commons/compress/tar/data.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- data.txt 23 Nov 2003 20:07:47 - 1.1 +++ data.txt 2 Dec 2003 21:33:40 - 1.2 @@ -1,15 +1,15 @@ -One of the greatest benefactors of all lifekind was a man who -couldn't keep his mind on the job at hand. -Brilliant? -Certainly. -One of the foremost genetic engineers of his or any other -generation, including a number he had designed himself? -Without a doubt. -The problem was that he was far too interested in things which -he shouldn't be interested in, at least as people would tell him, -not now. -He was also, partly because of this, of a rather irritable -disposition. -So when the world was threatened by terrible invaders from a -distant star, who were still a fair way off but traveling fast, +One of the greatest benefactors of all lifekind was a man who +couldn't keep his mind on the job at hand. +Brilliant? +Certainly. +One of the foremost genetic engineers of his or any other +generation, including a number he had designed himself? +Without a doubt. +The problem was that he was far too interested in things which +he shouldn't be interested in, at least as people would tell him, +not now. +He was also, partly because of this, of a rather irritable +disposition. +So when the world was threatened by terrible invaders from a +distant star, who were still a fair way off but traveling fast, he, Blart Versenwald III... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/compress LICENSE.txt
dirkv 2003/12/02 13:36:29 Added: compress LICENSE.txt Log: license file Revision ChangesPath 1.1 jakarta-commons-sandbox/compress/LICENSE.txt Index: LICENSE.txt === /* * $Source: /home/cvs/jakarta-commons-sandbox/compress/LICENSE.txt,v $ * $Revision: 1.1 $ * $Date: 2003/12/02 21:36:29 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation - http://www.apache.org/; *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/ * */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/bzip2/src/xdocs/stylesheets changes.vsl docs.vsl project.xml templates.vm velocity.properties
dirkv 2003/12/02 13:46:41 Removed: bzip2.cvsignore ant.properties.sample build.xml default.properties bzip2/examples README.txt bzip2/examples/basic Bzip2Compress.java Bzip2Uncompress.java README.txt bzip2/src/java/org/apache/commons/bzip2 BZip2Constants.java CBZip2InputStream.java CBZip2OutputStream.java CRC.java package.html bzip2/src/test/org/apache/commons/bzip2/test BzipTestCase.java asf-logo-huge.tar asf-logo-huge.tar.bz2 bzip2/src/xdocs index.xml bzip2/src/xdocs/css ns4_only.css print.css site.css tigris.css bzip2/src/xdocs/stylesheets changes.vsl docs.vsl project.xml templates.vm velocity.properties Log: moved to commons-compress component - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/iterators AbstractTestMapIterator.java
scolebourne2003/12/02 13:56:34 Modified:collections/src/test/org/apache/commons/collections/iterators AbstractTestMapIterator.java Log: Fix bug in error message text Revision ChangesPath 1.8 +3 -3 jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestMapIterator.java Index: AbstractTestMapIterator.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestMapIterator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AbstractTestMapIterator.java 1 Dec 2003 22:48:58 - 1.7 +++ AbstractTestMapIterator.java 2 Dec 2003 21:56:34 - 1.8 @@ -265,7 +265,7 @@ assertSame(setValue must return old value, value, old); assertEquals(Map must contain key, true, map.containsKey(key)); assertEquals(Map must not contain old value, false, map.containsValue(old)); -assertEquals(Map must contain old value, true, map.containsValue(newValue)); +assertEquals(Map must contain new value, true, map.containsValue(newValue)); verify(); it.setValue(newValue); // same value - should be OK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map IdentityMap.java
scolebourne2003/12/02 13:57:08 Modified:collections/src/test/org/apache/commons/collections/map TestAll.java Added: collections/src/test/org/apache/commons/collections/map TestIdentityMap.java collections/src/java/org/apache/commons/collections/map IdentityMap.java Log: Add IdentityMap implementation for reference comparisons Revision ChangesPath 1.6 +4 -4 jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestAll.java Index: TestAll.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestAll.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TestAll.java 2 Dec 2003 00:44:13 - 1.5 +++ TestAll.java 2 Dec 2003 21:57:08 - 1.6 @@ -86,8 +86,8 @@ suite.addTest(TestFixedSizeMap.suite()); suite.addTest(TestFixedSizeSortedMap.suite()); suite.addTest(TestFlat3Map.suite()); -//suite.addTest(TestHashedMap.suite()); -//suite.addTest(TestIdentityMap.suite()); +suite.addTest(TestHashedMap.suite()); +suite.addTest(TestIdentityMap.suite()); suite.addTest(TestLazyMap.suite()); suite.addTest(TestLazySortedMap.suite()); suite.addTest(TestListOrderedMap.suite()); 1.1 jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestIdentityMap.java Index: TestIdentityMap.java === /* * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestIdentityMap.java,v 1.1 2003/12/02 21:57:08 scolebourne Exp $ * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.collections.map; import java.util.Iterator; import java.util.Map; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; import org.apache.commons.collections.AMap; import org.apache.commons.collections.AbstractTestObject;
[digester] repost: variable expansion in digester
Hi, There's been no comment by anyone on the following emails. This is just a reminder(I know everyone's busy). http://marc.theaimsgroup.com/?l=jakarta-commons-devm=106979874724976w=2 http://marc.theaimsgroup.com/?l=jakarta-commons-devm=106989251623459w=2 Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[compress] added bzip2 and website
The main commit message wasn't delivered but bzip is completely moved to compress. (one component less to mavenize ;-) If you have problems with the unit tests make sure you do a clean checkout first (I had to update the test data as binary files). Site preview: http://cvs.apache.org/~dirkv/compress/index.html -- Dirk dirkv 2003/12/02 12:43:04 Added: compress/src/java/org/apache/commons/compress/bzip2 BZip2Constants.java CBZip2InputStream.java CBZip2OutputStream.java CRC.java package.html Log: move bzip2 implementation to compress component - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBUtils] Extending QueryLoader...
--- Hernan Silberman [EMAIL PROTECTED] wrote: Hello, I'm working on an application that uses Named Queries much like the DBUtils QueryLoader class reads in from a Java properties file. The queries in my application are stored in a relational database on the server side and I was hoping I could extend QueryLoader so it fetched the NAME/SQL pairs in an application-specific way, something like this: public synchronized Map load(DataSource aDS) throws IOException; public synchronized void unload(DataSource aDS); I'm new to DBUtils, and figured I'd ask before trying to extend this class in my code to accomodate something like the two methods above. Is this a sane thing to do? I won't get exactly what I want by extending this class, because I don't need the properties file versions of load and unload. Should I just create an alternate app-specific QueryLoader, or am I not seeing a better way of leveraging the existing QueryLoader class? QueryLoader isn't used by other DbUtils classes; it's just a standalone helper class that loads queries from properties files. So, you won't gain anything by subclassing it and replacing it with a DB lookup. David Thanks for the response. Keeping a registry of named queries seems like a common thing to do and I see lots of utility in having a helper class like QueryLoader to do it with. I was hoping I could easily change QueryLoader's behavior so it would look for it's name/query mapping somewhere other than a properties file, but alas, it's such a simple problem it's no big deal to handle this in my own code with another class. On another note isn't it risky to return a reference to queryMap below without first wrapping it in Collections.unmodifiableMap( queryMap ) ? I lack trust. public synchronized Map load(String path) throws IOException { Map queryMap = (Map) this.queries.get(path); if (queryMap == null) { queryMap = this.loadQueries(path); this.queries.put(path, queryMap); } return queryMap; } thanks... hernan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [beanutils] Dynabeans
hi henri i'm afraid that i'm not a dynabeans expert but it looks like you'll have to make do :) i don't think that there's an factory to make this easy (but it'd be easy to add one :) - robert On 1 Dec 2003, at 16:27, Henri Yandell wrote: I was playing with DynaBeans recently but couldn't find any faster way to create a DynaBean than: DynaClass dc = new BasicDynaClass( SomeNameBean, BasicDynaBean.class, new DynaProperty[] { new DynaProperty(property) } ); DynaBean seeker = new BasicDynaBean( dc ); seeker.set(property, value); or something with more properties/types etc. Is there any kind of Factory to make life easier? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [digester] repost: variable expansion in digester
hi simon i've been looking at this tonight. i hope to be in a position to commit something soon but i might have to leave some tidying up left to do tomorrow. - robert On 2 Dec 2003, at 22:04, Simon Kitching wrote: Hi, There's been no comment by anyone on the following emails. This is just a reminder(I know everyone's busy). http://marc.theaimsgroup.com/?l=jakarta-commons- devm=106979874724976w=2 http://marc.theaimsgroup.com/?l=jakarta-commons- devm=106989251623459w=2 Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[digester][review] New Schema supports
Hi, attached is an implementation of xml schema that is parser independent. The logic for Xerces 2.1/Xerces 2.3 and others parser has been splitted into two new classes: digester/parser/XercesParser digester/parser/GenericParser The digester has been modified to call ParserFeatureSetterFactory, which will discover which parser is used (see the attached diff). I have tested with Xerces 2.1, Xerces 2.5 and Crimson (default with JDK 1.4). I also tested the code using Tomcat 5. Let me know what you think. Once we all agree I will commit it. Thanks, -- Jeanfrancois /* * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.parser; import java.util.Properties; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.xml.sax.SAXException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; /** * Create a codeSAXParser/code configured to support XML Schema and DTD. * * @author Jean-Francois Arcand */ public class GenericParser{ /** * The Log to which all SAX event related logging calls will be made. */ protected static Log log = LogFactory.getLog(org.apache.commons.digester.Digester.sax); /** * The JAXP 1.2 property required to set up the schema location. */ private static final String JAXP_SCHEMA_SOURCE = http://java.sun.com/xml/jaxp/properties/schemaSource;; /** * The JAXP 1.2 property to set up the schemaLanguage used. */ protected static String JAXP_SCHEMA_LANGUAGE = http://java.sun.com/xml/jaxp/properties/schemaLanguage;; /** * Create a codeSAXParser/code configured to support XML Scheman and DTD * @param properties parser specific properties/features * @return an XML Schema/DTD enabled codeSAXParser/code */ public static SAXParser newSAXParser(Properties properties) throws ParserConfigurationException, SAXException, SAXNotRecognizedException{ SAXParserFactory factory = (SAXParserFactory)properties.get(SAXParserFactory); SAXParser parser = factory.newSAXParser();
Re: [collections] AMap/IterableMap name
non-binding +1 on IterableMap It is longer, but Map2 is painful. -Brian On Tuesday, December 2, 2003, at 04:22 PM, Stephen Colebourne wrote: There is no obvious 'standard' to follow here, other than adding '2' to the end (LayoutManager2). But even Sun tends to use descriptive alternate names a lot of the time (Map to replace Dictionary etc.) I'll probably change it to IterableMap unless anyone has better ideas. Stephen - Original Message - From: __matthewHawthorne [EMAIL PROTECTED] Stephen Colebourne wrote: I can think of various possible names: Map2 - follows Sun naming standards for replacing interfaces MapA - similar idea, but doesn't clash if Sun ever creates Map2 AMap - similar idea but reversed (A is for Apache) IMap - similar idea, but I is for interface IterableMap - the long name If people favour IterableMap, then thats fine. I was looking for something short to indicate that this should be a general replacement to using Map. Maybe IterableMap is clearer though Naming opinions please? I like IterableMap, but I can also see why you wanted a short name. What about XMap or MapX, to indicate a Map extension, like the javax.* packages? Similarly, HashMapX and XHashMap could be used instead of HashedMap. It's kind of a strange situation, but it would be nice to come up with a nice naming standard for classes which can replace their JDK counterparts. Any other suggestions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester/substitution - New directory
rdonkin 2003/12/02 15:18:53 jakarta-commons/digester/src/test/org/apache/commons/digester/substitution - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/substitution - New directory
rdonkin 2003/12/02 15:19:01 jakarta-commons/digester/src/java/org/apache/commons/digester/substitution - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Jelly] XML Declaration
Christopher, Doesn't the core:file tag do this already ? Paul Christopher W. Farnham wrote: Is there an elegant way to make sure the XML declaration is included when writing to XMOutput? I have a factory method a la the core FileTag where I was calling |outputFormat.setSuppressDeclaration(false); |This didn't work (there was no declaration at the top of my XML files). Finally I ended up hacking my factory method to do this: |OutputFormat format = new OutputFormat(); //we can use this line if we want results pretty printed //format = OutputFormat.createPrettyPrint(); if (xmlDeclaration) { writer.write(?xml version=\1.0\ encoding=\UTF-8\?.toCharArray()); } format.setEncoding( UTF8 ); format.setSuppressDeclaration(true); final XMLWriter xmlWriter = new XMLWriter(writer, format); xmlWriter.setEscapeText(false); XMLOutput returnOutput = new XMLOutput() { public void close() throws IOException { xmlWriter.close(); } }; returnOutput.setContentHandler(xmlWriter); returnOutput.setLexicalHandler(xmlWriter); return returnOutput; |This, of course, is not the best way to do things, but it works. Did I miss something? Thanks, Christopher Farnham Senior Consultant at Wrycan, Inc. [EMAIL PROTECTED] http://www.wrycan.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester DigesterTestCase.java
rdonkin 2003/12/02 15:21:16 Modified:digester build.xml digester/src/java/org/apache/commons/digester Digester.java digester/src/test/org/apache/commons/digester DigesterTestCase.java Added: digester/src/java/org/apache/commons/digester Substitutor.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.50 +17 -2 jakarta-commons/digester/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-commons/digester/build.xml,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- build.xml 19 Nov 2003 21:07:06 - 1.49 +++ build.xml 2 Dec 2003 23:21:16 - 1.50 @@ -273,7 +273,8 @@ test.regex, test.wdrules, test.plugins, - test.others + test.others, + test.substitution description=Run all unit test cases /target @@ -503,6 +504,20 @@ failonerror=${test.failonerror} jvmarg value=-D${logopt}/ arg value=org.apache.commons.digester.TestOthers/ + classpath refid=test.classpath/ +/java + /target + + target name=test.substitution depends=compile.tests + description=Run Substitutions tests ... +echo message=Running Substitutions tests .../ +condition property=logopt value=${log.factoryopt}=${log.class} + istrue value=${suppressLogOutputDuringTests}/ +/condition +java classname=${test.runner} fork=yes +failonerror=${test.failonerror} + jvmarg value=-D${logopt}/ + arg value=org.apache.commons.digester.substitution.TestAll/ classpath refid=test.classpath/ /java /target 1.87 +35 -8 jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java Index: Digester.java === RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- Digester.java 19 Nov 2003 21:05:19 - 1.86 +++ Digester.java 2 Dec 2003 23:21:16 - 1.87 @@ -360,7 +360,11 @@ protected static final String W3C_XML_SCHEMA = http://www.w3.org/2001/XMLSchema;; - +/** + * An optional class that substitutes values in attributes and body text. + * This may be null and so a null check is always required before use. + */ +protected Substitutor substitutor; // - Properties @@ -934,6 +938,22 @@ return reader; } +/** + * Gets the codeSubstitutor/code used to convert attributes and body text. + * @return Substitutor, null if not substitutions are to be performed. + */ +public Substitutor getSubstitutor() { +return substitutor; +} + +/** + * Sets the codeSubstitutor/code to be used to convert attributes and body text. + * @param substitutor the Substitutor to be used to convert attributes and body text + * or null if not substitution of these values is to be performed. + */ +public void setSubstitutor(Substitutor substitutor) { +this.substitutor = substitutor; +} // - ContentHandler Methods @@ -1038,6 +1058,10 @@ List rules = getRules().match(namespaceURI, match); if ((rules != null) (rules.size() 0)) { String bodyText = this.bodyText.toString(); +Substitutor substitutor = getSubstitutor(); +if (substitutor!= null) { +bodyText = substitutor.substitute(bodyText); +} for (int i = 0; i rules.size(); i++) { try { Rule rule = (Rule) rules.get(i); @@ -1282,7 +1306,10 @@ // Fire begin events for all relevant rules List rules = getRules().match(namespaceURI, match); if ((rules != null) (rules.size() 0)) { -String bodyText = this.bodyText.toString(); +Substitutor substitutor = getSubstitutor(); +if (substitutor!= null) { +list = substitutor.substitute(list); +} for (int i = 0; i rules.size();
cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/substitution VariableSubstitutor.java
rdonkin 2003/12/02 15:21:39 Added: digester/src/java/org/apache/commons/digester/substitution VariableSubstitutor.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.1 jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableSubstitutor.java Index: VariableSubstitutor.java === /* * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableSubstitutor.java,v 1.1 2003/12/02 23:21:39 rdonkin Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 23:21:39 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.substitution; import org.apache.commons.digester.Substitutor; import org.xml.sax.Attributes; /** * Substitutor implementation that support variable replacement * for both attributes and body text. * The actual expansion of variables into text is delegated to [EMAIL PROTECTED] VariableExpander} * implementations. * Supports setting an expander just for body text or just for attributes. * Also supported is setting no expanders for body text and for attributes. * * @author Robert Burrell Donkin * @version $Revision: 1.1 $ $Date: 2003/12/02 23:21:39 $ */ public class VariableSubstitutor extends Substitutor { /** * The expander to be used to expand variables in the attributes. * Null when no expansion should be performed. */ private VariableExpander attributesExpander; /** * Attributes implementation that (lazily) performs variable substitution. * Will be lazily created when needed then reused. */ private VariableAttributes variableAttributes; /** * The expander to be used to expand variables in the body text. * Null when no expansion should be performed. */ private VariableExpander
cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/substitution VariableExpander.java
rdonkin 2003/12/02 15:21:56 Added: digester/src/java/org/apache/commons/digester/substitution VariableExpander.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.1 jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableExpander.java Index: VariableExpander.java === /* * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableExpander.java,v 1.1 2003/12/02 23:21:55 rdonkin Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 23:21:55 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.substitution; /** * pAn Interface describing a class capable of expanding strings which * may contain variable references. The exact syntax of the reference, * and the mechanism for determining the corresponding value to be used * is up to the concrete implementation./p * * @author Simon Kitching * @version $Revision: 1.1 $ $Date: 2003/12/02 23:21:55 $ */ public interface VariableExpander { /** * Return the input string with any variables replaced by their * corresponding value. If there are no variables in the string, * then the input parameter is returned unaltered. */ public String expand(String param); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/substitution VariableAttributes.java
rdonkin 2003/12/02 15:22:12 Added: digester/src/java/org/apache/commons/digester/substitution VariableAttributes.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.1 jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableAttributes.java Index: VariableAttributes.java === /* * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableAttributes.java,v 1.1 2003/12/02 23:22:11 rdonkin Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 23:22:11 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.substitution; import org.xml.sax.Attributes; import java.util.Map; import java.util.ArrayList; /** * pWrapper for an org.xml.sax.Attributes object which expands any * variables referenced in the attribute value via ${foo} or similar. * This is only done something actually asks for the attribute value, * thereby imposing no performance penalty if the attribute is not used./p * * @author Simon Kitching * @version $Revision: 1.1 $ $Date: 2003/12/02 23:22:11 $ */ public class VariableAttributes implements Attributes { // list of mapped attributes. private ArrayList values = new ArrayList(10); private Attributes attrs; private VariableExpander expander; // --- Public Methods /** * Specify which attributes class this object is a proxy for. */ public void init(Attributes attrs, VariableExpander expander) { this.attrs = attrs; this.expander = expander; // I hope this doesn't release the memory for this array; for // efficiency, this should just mark the array as being size 0. values.clear(); } public String getValue(int index) { if
cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/substitution MultiVariableExpander.java
rdonkin 2003/12/02 15:22:28 Added: digester/src/java/org/apache/commons/digester/substitution MultiVariableExpander.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.1 jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/MultiVariableExpander.java Index: MultiVariableExpander.java === /* * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/MultiVariableExpander.java,v 1.1 2003/12/02 23:22:28 rdonkin Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 23:22:28 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.substitution; import java.util.Map; import java.util.ArrayList; /** * pExpands variable references from multiple sources./p * * @author Simon Kitching * @version $Revision: 1.1 $ $Date: 2003/12/02 23:22:28 $ */ public class MultiVariableExpander implements VariableExpander { private int nEntries = 0; private ArrayList markers = new ArrayList(2); private ArrayList sources = new ArrayList(2); public MultiVariableExpander() { } public void addSource(String marker, Map source) { ++nEntries; markers.add(marker); sources.add(source); } /* * Expands any variable declarations using any of the known * variable marker strings. * * @throws IllegalArgumentException if the input param references * a variable which is not known to the specified source. */ public String expand(String param) { for(int i=0; inEntries; ++i) { param = expand( param, (String) markers.get(i), (Map) sources.get(i)); } return param; } /** * Replace any occurrences within the
cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester/substitution TestAll.java
rdonkin 2003/12/02 15:22:57 Added: digester/src/test/org/apache/commons/digester/substitution TestAll.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.1 jakarta-commons/digester/src/test/org/apache/commons/digester/substitution/TestAll.java Index: TestAll.java === /* * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/substitution/TestAll.java,v 1.1 2003/12/02 23:22:57 rdonkin Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 23:22:57 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.substitution; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Entry point for all substitution package tests. * * @author Robert Burrell Donkin */ public class TestAll extends TestCase { public TestAll(String testName) { super(testName); } public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(VariableExpansionTestCase.suite()); return suite; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester/substitution VariableExpansionTestCase.java
rdonkin 2003/12/02 15:23:10 Added: digester/src/test/org/apache/commons/digester/substitution VariableExpansionTestCase.java Log: Added support for substitution of variables (and anything else that people want ;). This is a first cut, hopefully I'll be back with more documentation and Remy's peculiar implementation tommorrow. Contains contributions by Simon Kitching. Revision ChangesPath 1.1 jakarta-commons/digester/src/test/org/apache/commons/digester/substitution/VariableExpansionTestCase.java Index: VariableExpansionTestCase.java === /* * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/substitution/VariableExpansionTestCase.java,v 1.1 2003/12/02 23:23:10 rdonkin Exp $ * $Revision: 1.1 $ * $Date: 2003/12/02 23:23:10 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names Apache, The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *Apache nor may Apache appear in their names without prior *written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.digester.substitution; import org.apache.commons.digester.SimpleTestBean; import org.apache.commons.digester.Digester; import java.io.IOException; import java.io.StringReader; import java.util.HashMap; import java.util.LinkedList; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.xml.sax.SAXException; /** * pTest Case for the variable expansion facility in Digester. * * @author Simon Kitching * @version $Revision: 1.1 $ $Date: 2003/12/02 23:23:10 $ */ public class VariableExpansionTestCase extends TestCase { // --- Constructors /** * Construct a new instance of this test case. * * @param name Name of the test case */ public VariableExpansionTestCase(String name) { super(name); } // --- Overall Test Methods /** * Set up instance variables required by this test case. */ public void setUp() { } /** * Return the tests included in this test suite. */ public static Test
Re: [digester] repost: variable expansion in digester
hi simon i've committed a first cut so that people can take a look (and post any comments before i get too attached to the design ;). i've abstracted the substitution into a separate abstract class which has an interface for substituting both body text and attributes. this should allow them to variable separately (so that people can do stuff like substitute just body text, for example). you code forms the implementation contained in the new substitution package. there's a little more work to create an implementation but i think that the gains are big - by decoupling the implementation we can support any strategy that users care to think of. i need to tidy up tomorrow by adding more documentation and looking at remy's implementation. i'll probably create a Substitutor implementation that just does what tomcat needs. (but it might not be necessary.) this is work best left until after a sleep :) comments, please. (documentation patches would be even more gratefully received ;) - robert On 2 Dec 2003, at 22:04, Simon Kitching wrote: Hi, There's been no comment by anyone on the following emails. This is just a reminder(I know everyone's busy). http://marc.theaimsgroup.com/?l=jakarta-commons- devm=106979874724976w=2 http://marc.theaimsgroup.com/?l=jakarta-commons- devm=106989251623459w=2 Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[digester] anyone care to volunteer to write something for the newsletter?
anyone care to volunteer to write something for the newsletter? (we've got quite a bit of good new stuff and we'll probably be wanting a release sometime soonish.) - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/bag TestTreeBag.java TestHashBag.java TestAll.java AbstractTestBag.java
scolebourne2003/12/02 15:36:12 Modified:collections/src/java/org/apache/commons/collections HashBag.java TreeBag.java DefaultMapBag.java collections/src/test/org/apache/commons/collections/bag TestAll.java AbstractTestBag.java Added: collections/src/java/org/apache/commons/collections/bag TreeBag.java AbstractMapBag.java HashBag.java collections/src/test/org/apache/commons/collections/bag TestTreeBag.java TestHashBag.java Log: Add new faster Bag implementations in bag subpackage Deprecate originals in main package Revision ChangesPath 1.1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TreeBag.java Index: TreeBag.java === /* * $Header: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TreeBag.java,v 1.1 2003/12/02 23:36:12 scolebourne Exp $ * * * The Apache Software License, Version 1.1 * * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowledgement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgement may appear in the software itself, *if and wherever such third-party acknowledgements normally appear. * * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * */ package org.apache.commons.collections.bag; import java.util.Collection; import java.util.Comparator; import java.util.SortedMap; import java.util.TreeMap; import org.apache.commons.collections.SortedBag; /** * Implements codeSortedBag/code, using a codeTreeMap/code to provide * the data storage. This is the standard implementation of a sorted bag. * p * Order will be maintained among the bag members and can be viewed through the * iterator. * * @since Commons Collections 3.0 * @version $Revision: 1.1 $ $Date: 2003/12/02 23:36:12 $ * * @author Chuck Burdick * @author Stephen Colebourne */ public class TreeBag extends AbstractMapBag implements SortedBag { /** * Constructs an empty codeTreeBag/code. */ public TreeBag() { super(new TreeMap()); } /** * Constructs an empty bag that maintains order on its unique * representative members according to the given [EMAIL PROTECTED] Comparator}. * * @param comparator the comparator to use */ public TreeBag(Comparator comparator) { super(new
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/bag package.html
scolebourne2003/12/02 15:39:49 Modified:collections/src/java/org/apache/commons/collections/bag package.html Log: Update the associated package html Revision ChangesPath 1.2 +8 -2 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/package.html Index: package.html === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- package.html 16 Nov 2003 00:05:43 - 1.1 +++ package.html 2 Dec 2003 23:39:48 - 1.2 @@ -1,6 +1,6 @@ BODY p -This package contains implementations of the Set and SortedSet interfaces. +This package contains implementations of the Bag and SortedBag interfaces. p The implementations are in the form of direct implementations and decorators. A decorator wraps another implementation of the interface to add some @@ -8,8 +8,14 @@ p The following implementations are provided in the package: ul +liHashBag - implementation that uses a HashMap to store the data +liTreeBag - implementation that uses a TreeMap to store the data +/ul +p +The following decorators are provided in the package: +ul liSynchronized - synchronizes method access for multi-threaded environments -liUnmodifiable - ensures the collection cannot be altered +liUnmodifiable - ensures the bag cannot be altered liPredicated - ensures that only elements that are valid according to a predicate can be added liTyped - ensures that only elements that are of a specific type can be added liTransformed - transforms each element added to the bag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [digester] anyone care to volunteer to write something for the newsletter?
On Wed, 2003-12-03 at 12:34, robert burrell donkin wrote: anyone care to volunteer to write something for the newsletter? (we've got quite a bit of good new stuff and we'll probably be wanting a release sometime soonish.) I'll put my hand up. I'm free this evening (apart from looking at all the new substitution stuff, and Jeanfrancois' schema patch). I presume this is the newsletter whose wiki page is here: http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheNewsletterDrafts/Issue3 It would be nice to be able to review a changelog to base the newletter stuff on. Is that easily available (other than cvs diff -r DIGESTER_1_5)? Would it be worth compiling a draft release notes at the same time? The release is looking good too - I think we're pretty close to ticking off everything on the list that was circulated before. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/data/test IdentityMap.fullCollection.version3.obj IdentityMap.emptyCollection.version3.obj
scolebourne2003/12/02 15:48:13 Added: collections/data/test IdentityMap.fullCollection.version3.obj IdentityMap.emptyCollection.version3.obj Log: Add IdentityMap implementation for reference comparisons Revision ChangesPath 1.1 jakarta-commons/collections/data/test/IdentityMap.fullCollection.version3.obj Binary file 1.1 jakarta-commons/collections/data/test/IdentityMap.emptyCollection.version3.obj Binary file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map HashedMap.java UnmodifiableMap.java Flat3Map.java
scolebourne2003/12/02 15:51:50 Modified:collections/src/test/org/apache/commons/collections/map TestUnmodifiableMap.java AbstractTestOrderedMap.java TestIdentityMap.java TestHashedMap.java TestFlat3Map.java collections/src/java/org/apache/commons/collections OrderedMap.java MapIterator.java BidiMap.java collections/src/java/org/apache/commons/collections/map HashedMap.java UnmodifiableMap.java Flat3Map.java Added: collections/src/test/org/apache/commons/collections/map AbstractTestIterableMap.java collections/src/java/org/apache/commons/collections IterableMap.java Removed: collections/src/test/org/apache/commons/collections/map AbstractTestAMap.java collections/src/java/org/apache/commons/collections AMap.java Log: Rename AMap to IterableMap Revision ChangesPath 1.6 +3 -3 jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java Index: TestUnmodifiableMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TestUnmodifiableMap.java 1 Dec 2003 22:34:54 - 1.5 +++ TestUnmodifiableMap.java 2 Dec 2003 23:51:49 - 1.6 @@ -74,7 +74,7 @@ * * @author Phil Steitz */ -public class TestUnmodifiableMap extends AbstractTestAMap{ +public class TestUnmodifiableMap extends AbstractTestIterableMap{ public TestUnmodifiableMap(String testName) { super(testName); 1.4 +3 -3 jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestOrderedMap.java Index: AbstractTestOrderedMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestOrderedMap.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AbstractTestOrderedMap.java 1 Dec 2003 22:48:59 - 1.3 +++ AbstractTestOrderedMap.java 2 Dec 2003 23:51:49 - 1.4 @@ -79,7 +79,7 @@ * * @author Stephen Colebourne */ -public abstract class AbstractTestOrderedMap extends AbstractTestAMap { +public abstract class AbstractTestOrderedMap extends AbstractTestIterableMap { /** * JUnit constructor. 1.2 +5 -5 jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestIdentityMap.java Index: TestIdentityMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestIdentityMap.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestIdentityMap.java 2 Dec 2003 21:57:08 - 1.1 +++ TestIdentityMap.java 2 Dec 2003 23:51:49 - 1.2 @@ -64,7 +64,7 @@ import junit.framework.TestSuite; import junit.textui.TestRunner; -import org.apache.commons.collections.AMap; +import org.apache.commons.collections.IterableMap; import org.apache.commons.collections.AbstractTestObject; /** @@ -104,7 +104,7 @@ //--- public void testBasics() { -AMap map = new IdentityMap(); +IterableMap map = new IdentityMap(); assertEquals(0, map.size()); map.put(I1A, I2A); @@ -137,7 +137,7 @@ //--- public void testHashEntry() { -AMap map = new IdentityMap(); +IterableMap map = new IdentityMap(); map.put(I1A, I2A); map.put(I1B, I2A); 1.2 +3 -3 jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestHashedMap.java Index: TestHashedMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestHashedMap.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestHashedMap.java1 Dec 2003 22:34:54 - 1.1 +++ TestHashedMap.java2 Dec 2003 23:51:49 - 1.2 @@ -71,7 +71,7 @@ * * @author Stephen Colebourne */ -public class TestHashedMap extends AbstractTestAMap { +public class TestHashedMap extends AbstractTestIterableMap { public
Re: [collections] AMap/IterableMap name
IterableMap it is, now on CVS Stephen - Original Message - From: Brian McCallister [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 11:00 PM Subject: Re: [collections] AMap/IterableMap name non-binding +1 on IterableMap It is longer, but Map2 is painful. -Brian On Tuesday, December 2, 2003, at 04:22 PM, Stephen Colebourne wrote: There is no obvious 'standard' to follow here, other than adding '2' to the end (LayoutManager2). But even Sun tends to use descriptive alternate names a lot of the time (Map to replace Dictionary etc.) I'll probably change it to IterableMap unless anyone has better ideas. Stephen - Original Message - From: __matthewHawthorne [EMAIL PROTECTED] Stephen Colebourne wrote: I can think of various possible names: Map2 - follows Sun naming standards for replacing interfaces MapA - similar idea, but doesn't clash if Sun ever creates Map2 AMap - similar idea but reversed (A is for Apache) IMap - similar idea, but I is for interface IterableMap - the long name If people favour IterableMap, then thats fine. I was looking for something short to indicate that this should be a general replacement to using Map. Maybe IterableMap is clearer though Naming opinions please? I like IterableMap, but I can also see why you wanted a short name. What about XMap or MapX, to indicate a Map extension, like the javax.* packages? Similarly, HashMapX and XHashMap could be used instead of HashedMap. It's kind of a strange situation, but it would be nice to come up with a nice naming standard for classes which can replace their JDK counterparts. Any other suggestions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [collections] Race condition
HELP! Anyone got any good ideas or tools to track this down. It is now very occaisional, but may knock out the next gump run! Today it only happens when I run TestAllPackages. Stephen - Original Message - From: Stephen Colebourne [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:46 AM Subject: [collections] Race condition Sadly there seems to be a race condition in one of the new classes/tests There was 1 failure: 1) testMapIteratorSet(TestFlat3Map.bulkTestMapIterator.testMapIteratorSet) junit.framework.AssertionFailedError: Map must not contain old value expected:false but was:true at org.apache.commons.collections.iterators.AbstractTestMapIterator.testMapIter atorSet(AbstractTestMapIterator.java:267) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at org.apache.commons.collections.map.TestAll.main(TestAll.java:80) When I run with Eclipse debugger the error is in TestFlat3Map. When I run without the debugger, the error is in TestHashedMap. And occaisionaly it works. I'm going to sleep, so I'll disable the test for the moment in case Gump runs. If anyone wants to play they're welcome - I'm guessing its the test thats bad. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Jelly] XML Declaration
Paul, I have an architecture where some of my objects have associated jelly scripts which are an XML representation of the object, I call a method |'writeAsXML(File)'| and it gets written as XML to the file. Essentially, the jelly logic that's embedded in my java code borrows heavily from the core:file code, but I resisted using the core:file tag for a couple of reasons. 1) By not using the core:file tag, my jelly scripts end up looking more like the XML they produce. 2) My own java code can have hooks into logging and reporting etc. 3) I have some custom tags which allow for the above actions to happen recursively (when jellified objects contain other jellified objects) and having that code together makes it easier to maintain. 4) This does pretty much the same thing as castor's marshall behavior except I have a lot more control of the final output and it's more WYSIWYG like. I've looked closely at the source for core:file and can't see what I might have done differently. But in reading the explanation above, perhaps I've answered my own question because I have a little more going on behind the scenes than core:file, but I don't modify XMLOutput in any way after creating it, other than simply passing it around. Here's an example of one of my 'root' jelly scripts. The wr:embed object calls a similar script for each composed object in a Component-like pattern. ?xml version=1.0 encoding=UTF-8? j:jelly trim=true xmlns:j=jelly:core xmlns:x=jelly:xml xmlns:wr=jelly:com.wrycan.common.jelly.tags.wrycan.WrycanTagLibrary x:element name=book x:attribute name=xmlnshttp://xml.classwell.com/clg/x:attribute x:attribute name=xmlns:clghttp://xml.classwell.com/clg/x:attribute x:attribute name=xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance/x:attribute x:attribute name=xsi:schemaLocation${this.getSchemaLocation()}/x:attribute x:attribute name=id${this.getId()}/x:attribute meta wr:embed object=${this.getMetaSystem()} / wr:embed object=${this.getMetaContent()} / wr:embed object=${this.getMetaEducation()} / /meta bookName${this.getBookName()}/bookName j:forEach items=${this.getSectionsList()} var=section wr:embed object=${section} / /j:forEach /x:element /j:jelly Christopher Farnham Senior Consultant at Wrycan, Inc. [EMAIL PROTECTED] http://www.wrycan.com Paul Libbrecht wrote: Christopher, Doesn't the core:file tag do this already ? Paul Christopher W. Farnham wrote: Is there an elegant way to make sure the XML declaration is included when writing to XMOutput? I have a factory method a la the core FileTag where I was calling |outputFormat.setSuppressDeclaration(false); |This didn't work (there was no declaration at the top of my XML files). Finally I ended up hacking my factory method to do this: |OutputFormat format = new OutputFormat(); //we can use this line if we want results pretty printed //format = OutputFormat.createPrettyPrint(); if (xmlDeclaration) { writer.write(?xml version=\1.0\ encoding=\UTF-8\?.toCharArray()); } format.setEncoding( UTF8 ); format.setSuppressDeclaration(true); final XMLWriter xmlWriter = new XMLWriter(writer, format); xmlWriter.setEscapeText(false); XMLOutput returnOutput = new XMLOutput() { public void close() throws IOException { xmlWriter.close(); } }; returnOutput.setContentHandler(xmlWriter); returnOutput.setLexicalHandler(xmlWriter); return returnOutput; |This, of course, is not the best way to do things, but it works. Did I miss something? Thanks, Christopher Farnham Senior Consultant at Wrycan, Inc. [EMAIL PROTECTED] http://www.wrycan.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBUtils] Extending QueryLoader...
--- Hernan Silberman [EMAIL PROTECTED] wrote: --- Hernan Silberman [EMAIL PROTECTED] wrote: Hello, I'm working on an application that uses Named Queries much like the DBUtils QueryLoader class reads in from a Java properties file. The queries in my application are stored in a relational database on the server side and I was hoping I could extend QueryLoader so it fetched the NAME/SQL pairs in an application-specific way, something like this: public synchronized Map load(DataSource aDS) throws IOException; public synchronized void unload(DataSource aDS); I'm new to DBUtils, and figured I'd ask before trying to extend this class in my code to accomodate something like the two methods above. Is this a sane thing to do? I won't get exactly what I want by extending this class, because I don't need the properties file versions of load and unload. Should I just create an alternate app-specific QueryLoader, or am I not seeing a better way of leveraging the existing QueryLoader class? QueryLoader isn't used by other DbUtils classes; it's just a standalone helper class that loads queries from properties files. So, you won't gain anything by subclassing it and replacing it with a DB lookup. David Thanks for the response. Keeping a registry of named queries seems like a common thing to do and I see lots of utility in having a helper class like QueryLoader to do it with. I was hoping I could easily change QueryLoader's behavior so it would look for it's name/query mapping somewhere other than a properties file, but alas, it's such a simple problem it's no big deal to handle this in my own code with another class. You could subclass QueryLoader but you wouldn't be gaining anything. On another note isn't it risky to return a reference to queryMap below without first wrapping it in Collections.unmodifiableMap( queryMap ) ? I lack trust. You could consider that a feature if you wanted to load an initial set of queries from a file and then dynamically change them at runtime. QueryLoader doesn't depend on the state of the Maps for it to function properly so there's no need to wrap it in an unmodifiable view. David public synchronized Map load(String path) throws IOException { Map queryMap = (Map) this.queries.get(path); if (queryMap == null) { queryMap = this.loadQueries(path); this.queries.put(path, queryMap); } return queryMap; } thanks... hernan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [digester] anyone care to volunteer to write something for the newsletter?
On 2 Dec 2003, at 23:47, Simon Kitching wrote: On Wed, 2003-12-03 at 12:34, robert burrell donkin wrote: anyone care to volunteer to write something for the newsletter? (we've got quite a bit of good new stuff and we'll probably be wanting a release sometime soonish.) I'll put my hand up. I'm free this evening (apart from looking at all the new substitution stuff, and Jeanfrancois' schema patch). great :) I presume this is the newsletter whose wiki page is here: http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheNewsletterDrafts/ Issue3 yep It would be nice to be able to review a changelog to base the newletter stuff on. yes, it would be nice. what's worked well (for other components i've been involved with) is to keep a record of work done when it's done. if it's dated, then it's easy to use it as a basis for the newsletter. Is that easily available (other than cvs diff -r DIGESTER_1_5)? if you keep your emails, you could probably extract the information from the cvs commits. not sure if it's any easier. Would it be worth compiling a draft release notes at the same time? not really. creating release notes from the diff is one of the chores associated with acting as release manager. i don't see any purpose in two people having to do it. (i'd need to go through and check every entry.) The release is looking good too - I think we're pretty close to ticking off everything on the list that was circulated before. cool. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [digester] anyone care to volunteer to write something for the newsletter?
Simon Kitching wrote: On Wed, 2003-12-03 at 12:34, robert burrell donkin wrote: anyone care to volunteer to write something for the newsletter? (we've got quite a bit of good new stuff and we'll probably be wanting a release sometime soonish.) I'll put my hand up. I'm free this evening (apart from looking at all the new substitution stuff, and Jeanfrancois' schema patch). I presume this is the newsletter whose wiki page is here: http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheNewsletterDrafts/Issue3 It would be nice to be able to review a changelog to base the newletter stuff on. Is that easily available (other than cvs diff -r DIGESTER_1_5)? Would it be worth compiling a draft release notes at the same time? The release is looking good too - I think we're pretty close to ticking off everything on the list that was circulated before. Regards, Simon Let me know if you need any help. It's already the evening here but I can take a look tomorrow morning. Thanks, -- Jeanfrancois - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/bag TestTreeBag.java TestHashBag.java
scolebourne2003/12/02 16:49:38 Modified:collections/src/java/org/apache/commons/collections/bag TreeBag.java AbstractMapBag.java HashBag.java collections/src/test/org/apache/commons/collections/bag TestTreeBag.java TestHashBag.java Added: collections/data/test TreeBag.fullCollection.version3.obj HashBag.emptyCollection.version3.obj HashBag.fullCollection.version3.obj TreeBag.emptyCollection.version3.obj Log: Make new Bag implementations Serializable Revision ChangesPath 1.2 +30 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TreeBag.java Index: TreeBag.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TreeBag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TreeBag.java 2 Dec 2003 23:36:12 - 1.1 +++ TreeBag.java 3 Dec 2003 00:49:38 - 1.2 @@ -57,6 +57,10 @@ */ package org.apache.commons.collections.bag; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; import java.util.Collection; import java.util.Comparator; import java.util.SortedMap; @@ -77,8 +81,11 @@ * @author Chuck Burdick * @author Stephen Colebourne */ -public class TreeBag extends AbstractMapBag implements SortedBag { +public class TreeBag extends AbstractMapBag implements SortedBag, Serializable { +/** Serial version lock */ +static final long serialVersionUID = -7740146511091606676L; + /** * Constructs an empty codeTreeBag/code. */ @@ -107,6 +114,7 @@ addAll(coll); } +//--- public Object first() { return ((SortedMap) getMap()).firstKey(); } @@ -117,6 +125,25 @@ public Comparator comparator() { return ((SortedMap) getMap()).comparator(); +} + +//--- +/** + * Write the bag out using a custom routine. + */ +private void writeObject(ObjectOutputStream out) throws IOException { +out.defaultWriteObject(); +out.writeObject(comparator()); +super.doWriteObject(out); +} + +/** + * Read the bag in using a custom routine. + */ +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { +in.defaultReadObject(); +Comparator comp = (Comparator) in.readObject(); +super.doReadObject(new TreeMap(comp), in); } } 1.2 +42 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java Index: AbstractMapBag.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractMapBag.java 2 Dec 2003 23:36:12 - 1.1 +++ AbstractMapBag.java 3 Dec 2003 00:49:38 - 1.2 @@ -57,6 +57,9 @@ */ package org.apache.commons.collections.bag; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.lang.reflect.Array; import java.util.Collection; import java.util.Collections; @@ -86,7 +89,7 @@ public abstract class AbstractMapBag implements Bag { /** The map to use to store the data */ -private final Map map; +private transient Map map; /** The current total size of the bag */ private int size; /** The modification count for fail fast iterators */ @@ -95,8 +98,17 @@ private transient Set uniqueSet; /** + * Constructor needed for subclass serialisation. + * + * @param map the map to assign + */ +protected AbstractMapBag() { +super(); +} + +/** * Constructor that assigns the specified Map as the backing store. - * The map must be empty. + * The map must be empty and non-null. * * @param map the map to assign */ @@ -530,6 +542,32 @@ return uniqueSet; } +//--- +/** + * Write the map out using a custom routine. + */ +protected void doWriteObject(ObjectOutputStream out) throws IOException { +out.writeInt(map.size()); +for (Iterator it =
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/buffer package.html
scolebourne2003/12/02 17:05:31 Modified:collections/src/java/org/apache/commons/collections/buffer package.html Log: Update the associated package html Revision ChangesPath 1.3 +8 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/package.html Index: package.html === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/package.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- package.html 1 Dec 2003 22:05:14 - 1.2 +++ package.html 3 Dec 2003 01:05:31 - 1.3 @@ -1,6 +1,6 @@ BODY p -This package contains implementations of the Set and SortedSet interfaces. +This package contains implementations of the Buffer and PriorityQueue interfaces. p The implementations are in the form of direct implementations and decorators. A decorator wraps another implementation of the interface to add some @@ -9,9 +9,13 @@ The following implementations are provided in the package: ul liBinaryHeap - implements both Buffer and PriorityQueue -liBounded - implements a buffer with a fixed size that throws exceptions when full -liCircular - implements a buffer with a fixed size that discards oldest when full -liUnbounded - implements a buffer that grows in size if necessary +liBoundedBuffer - implements a buffer with a fixed size that throws exceptions when full +liCircularBuffer - implements a buffer with a fixed size that discards oldest when full +liUnboundedBuffer - implements a buffer that grows in size if necessary +/ul +p +The following decorators are provided in the package: +ul liSynchronized - synchronizes method access for multi-threaded environments liUnmodifiable - ensures the collection cannot be altered liPredicated - ensures that only elements that are valid according to a predicate can be added - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/functor/src/java/org/apache/commons/functor/core/composite CompositeUnaryProcedure.java CompositeUnaryPredicate.java
rwaldhoff2003/12/02 17:07:36 Modified:functor/src/test/org/apache/commons/functor/core/composite TestCompositeUnaryProcedure.java TestCompositeUnaryPredicate.java functor/src/java/org/apache/commons/functor/core/composite CompositeUnaryProcedure.java CompositeUnaryPredicate.java Log: add tests, remove unused Revision ChangesPath 1.2 +16 -2 jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java Index: TestCompositeUnaryProcedure.java === RCS file: /home/cvs/jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestCompositeUnaryProcedure.java 3 Dec 2003 01:04:11 - 1.1 +++ TestCompositeUnaryProcedure.java 3 Dec 2003 01:07:36 - 1.2 @@ -106,6 +106,20 @@ new CompositeUnaryProcedure(new NoOp(),new Identity()).run(null); } +public void testNullNotAllowed() throws Exception { +try { +new CompositeUnaryProcedure(null); +fail(Expected NullPointerException); +} catch(NullPointerException e) { +// expected +} +try { +new CompositeUnaryProcedure(NoOp.instance(),null); +fail(Expected NullPointerException); +} catch(NullPointerException e) { +// expected +} +} public void testOf() throws Exception { new CompositeUnaryProcedure(new NoOp()).of(new Identity()).run(null); } 1.2 +20 -6 jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java Index: TestCompositeUnaryPredicate.java === RCS file: /home/cvs/jakarta-commons-sandbox/functor/src/test/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestCompositeUnaryPredicate.java 3 Dec 2003 01:04:11 - 1.1 +++ TestCompositeUnaryPredicate.java 3 Dec 2003 01:07:36 - 1.2 @@ -101,13 +101,27 @@ // Tests // -public void testEvaluate() throws Exception { -assertEquals(true,(new CompositeUnaryPredicate(new Constant(true))).test(null)); - +public void testTest() throws Exception { +assertEquals(true,(new CompositeUnaryPredicate(new Constant(true))).test(null)); assertEquals(true,(new CompositeUnaryPredicate(new Constant(true),new Constant(new Integer(3.test(xyzzy)); assertEquals(false,(new CompositeUnaryPredicate(new Constant(false),new Constant(new Integer(4.test(xyzzy)); } - + +public void testNullNotAllowed() throws Exception { +try { +new CompositeUnaryPredicate(null); +fail(Expected NullPointerException); +} catch(NullPointerException e) { +// expected +} +try { +new CompositeUnaryPredicate(Constant.truePredicate(),null); +fail(Expected NullPointerException); +} catch(NullPointerException e) { +// expected +} +} + public void testOf() throws Exception { CompositeUnaryPredicate f = new CompositeUnaryPredicate(new Constant(true)); assertTrue(f.test(null)); 1.2 +2 -10 jakarta-commons-sandbox/functor/src/java/org/apache/commons/functor/core/composite/CompositeUnaryProcedure.java Index: CompositeUnaryProcedure.java === RCS file: /home/cvs/jakarta-commons-sandbox/functor/src/java/org/apache/commons/functor/core/composite/CompositeUnaryProcedure.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CompositeUnaryProcedure.java 3 Dec 2003 01:04:12 - 1.1 +++ CompositeUnaryProcedure.java 3 Dec 2003 01:07:36 - 1.2 @@ -101,14 +101,6 @@ this.function = new CompositeUnaryFunction(f); } -public CompositeUnaryProcedure(UnaryProcedure p, UnaryFunction f, UnaryFunction g) { -if(null == p) { throw new NullPointerException(); } -if(null == f) { throw new NullPointerException(); } -if(null == g) { throw new NullPointerException(); } -this.procedure = p; -this.function = new CompositeUnaryFunction(f).of(g); -} - // modifiers //
DO NOT REPLY [Bug 25154] New: - IteratorChain bug with empty iterators.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25154. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25154 IteratorChain bug with empty iterators. Summary: IteratorChain bug with empty iterators. Product: Commons Version: 2.1 Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Collections AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Haven't tried this with nightly builds, but 2.1 collections have the follwoing problem: when the first iterator in a chain is empty, first call to hasNext returns false, on second and subsequent calls, true is returned again as it should. Here is an example: List emptyList = new ArrayList(); List nonEmptyList = new ArrayList(); nonEmptyList.add(new Object()); IteratorChain it = new IteratorChain(new Iterator[] {emptyList.iterator(), nonEmptyList.iterator()}); System.out.println(Next? + it.hasNext()); // prints false System.out.println(Next again? + it.hasNext()); // prints true Cheers, Andrus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Integrated Windows authentication
Is the HTTPClient able to work for proxy configured with integrated windows authentication? I read from the Microsoft website (http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/proddocs/standard/sec_auth_intwinauth.asp) that this authentication is formerly known as NTLM. However, it also says that it does not work over HTTP proxy connection and is suited only for intranet environment. Regards, Eng Hoe App Dev-DCS SGX-IT Division DID: (65) 62368963 FAX: (65) 64388840 email: [EMAIL PROTECTED] Confidentiality Caution === Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Opinions, conclusions and other information in this message that is not of an official nature shall be deemed as neither given nor endorsed by SGX unless indicated by an authorised representative independent of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integrated Windows authentication
On 2/12/03 6:05 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is the HTTPClient able to work for proxy configured with integrated windows authentication? I read from the Microsoft website (http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechno l/windowsserver2003/proddocs/standard/sec_auth_intwinauth.asp) that this authentication is formerly known as NTLM. However, it also says that it does not work over HTTP proxy connection and is suited only for intranet environment. HttpClient does support NTLM authentication and it does work with proxies. There has been a few issues lately so if you're having trouble it would be worth mentioning the specific problems you're having and we should be able to help out. For general info take a look at the authentication guide on the website (http://jakarta.apache.org/commons/httpclient/) I believe the specific page is http://jakarta.apache.org/commons/httpclient/authentication.html Regards, Adrian Sutton -- Intencha tomorrow's technology today Ph: 38478913 0422236329 Suite 8/29 Oatland Crescent Holland Park West 4121 Australia QLD www.intencha.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]