cvs commit: jakarta-commons/dbcp project.xml

2003-08-19 Thread mpoeschl
mpoeschl2003/08/19 10:33:54

  Modified:dbcp project.xml
  Log:
  upgrade to latest commons-pool snapshot
  
  Revision  ChangesPath
  1.12  +1 -1  jakarta-commons/dbcp/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/dbcp/project.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- project.xml   11 Aug 2003 12:07:43 -  1.11
  +++ project.xml   19 Aug 2003 17:33:54 -  1.12
  @@ -106,7 +106,7 @@
   
   
 commons-pool
  -  20030623.172700
  +  20030818.195203
   
   
 jdbc
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/pool project.xml

2003-08-18 Thread mpoeschl
mpoeschl2003/08/18 12:59:57

  Modified:pool project.xml
  Log:
  use collections-2.1 and junit-3.8.1
  
  Revision  ChangesPath
  1.13  +2 -2  jakarta-commons/pool/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/pool/project.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- project.xml   11 Aug 2003 11:47:41 -  1.12
  +++ project.xml   18 Aug 2003 19:59:57 -  1.13
  @@ -92,12 +92,12 @@
 
   
 commons-collections
  -  2.0
  +  2.1
   
   
   
 junit
  -  3.7
  +  3.8.1
   
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/dbcp project.xml

2003-06-29 Thread mpoeschl
mpoeschl2003/06/29 05:41:06

  Modified:dbcp project.xml
  Log:
  add myself as developer
  upgrade jars
  
  Revision  ChangesPath
  1.10  +8 -5  jakarta-commons/dbcp/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/dbcp/project.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- project.xml   7 Mar 2003 00:24:08 -   1.9
  +++ project.xml   29 Jun 2003 12:41:06 -  1.10
  @@ -73,6 +73,12 @@
 
   
   
  +  Martin Poeschl
  +  mpoeschl
  +  [EMAIL PROTECTED]
  +  tucana.at
  +
  +
 Rodney Waldhoff
 rwaldhoff
 
  @@ -90,19 +96,16 @@
   
   
 commons-collections
  -  2.0
  +  2.1
   
  -
   
 commons-pool
  -  SNAPSHOT
  +  20030623.172700
   
  -
   
 jdbc
 2.0
   
  -  
   
 junit
 3.8.1
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons-sandbox/configuration project.xml

2003-06-27 Thread mpoeschl
mpoeschl2003/06/27 13:07:29

  Modified:configuration project.xml
  Log:
  the timestamp is added by maven .. it should not be part of the currentVersion
  
  Revision  ChangesPath
  1.30  +2 -2  jakarta-commons-sandbox/configuration/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/project.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- project.xml   21 Jun 2003 22:11:04 -  1.29
  +++ project.xml   27 Jun 2003 20:07:28 -  1.30
  @@ -10,7 +10,7 @@
 3
 commons-configuration
 commons-configuration
  -  1.0-dev-3.20030607.194155
  +  1.0-dev-3
 
   Apache Software Foundation
   http://jakarta.apache.org/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration TestConfigurationFactory.java

2003-06-27 Thread mpoeschl
mpoeschl2003/06/27 13:06:08

  Modified:configuration/src/test/org/apache/commons/configuration
TestConfigurationFactory.java
  Log:
  remove log as it is not used
  
  Revision  ChangesPath
  1.6   +5 -21 
jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration/TestConfigurationFactory.java
  
  Index: TestConfigurationFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration/TestConfigurationFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestConfigurationFactory.java 7 Jun 2003 17:57:29 -   1.5
  +++ TestConfigurationFactory.java 27 Jun 2003 20:06:08 -  1.6
  @@ -58,9 +58,6 @@
   
   import junit.framework.TestCase;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  -
   /**
* Test the ConfigurationFactory
*
  @@ -69,9 +66,6 @@
*/
   public class TestConfigurationFactory extends TestCase
   {
  -
  -private static Log log = LogFactory.getLog(TestConfigurationFactory.class);
  -
   /** The Files that we test with */
   private File digesterRules = new File("conf/digesterRules.xml");
   private File testDigesterFile = new File("conf/testDigesterConfiguration.xml");
  @@ -88,7 +82,6 @@
   public TestConfigurationFactory(String s) throws Exception
   {
   super(s);
  -
   }
   
   public void setUp() throws Exception
  @@ -98,7 +91,6 @@
   
   public void testLoadingConfiguration() throws Exception
   {
  -
   configurationFactory.setConfigurationFileName(testDigesterFile.toString());
   
   compositeConfiguration = (CompositeConfiguration) 
configurationFactory.getConfiguration();
  @@ -114,12 +106,10 @@
   
   configuration = (Configuration) compositeConfiguration;
   assertEquals("I'm complex!", 
configuration.getProperty("element2.subelement.subsubelement"));
  -
   }
   
   public void testLoadingConfigurationReverseOrder() throws Exception
   {
  -
   
configurationFactory.setConfigurationFileName(testDigesterFileReverseOrder.toString());
   
   configuration = configurationFactory.getConfiguration();
  @@ -130,12 +120,10 @@
   
   configuration = configurationFactory.getConfiguration();
   assertEquals("1", configuration.getProperty("test.short"));
  -
   }
   
   public void testLoadingConfigurationWithRulesXML() throws Exception
   {
  -
   configurationFactory.setConfigurationFileName(testDigesterFile.toString());
   configurationFactory.setDigesterRules(digesterRules.toURL());
   
  @@ -155,7 +143,6 @@
   
   configuration = (Configuration) compositeConfiguration;
   assertEquals("I'm complex!", 
configuration.getProperty("element2.subelement.subsubelement"));
  -
   }
   
   public void testLoadingConfigurationNamespaceAware() throws Exception
  @@ -178,18 +165,16 @@
   
   try
   {
  -
   compositeConfiguration.getProperty("element2.subelement.subsubelement");
   fail("Should have thrown an exception");
   }
   catch (java.util.NoSuchElementException nsee)
  -{}
  -
  +{
  +}
   }
   
   public void testLoadingConfigurationBasePath() throws Exception
   {
  -
   
configurationFactory.setConfigurationFileName(testDigesterFileBasePath.toString());
   
   configurationFactory.setBasePath(testBasePath);
  @@ -211,12 +196,11 @@
   
   try
   {
  -
   compositeConfiguration.getProperty("element2.subelement.subsubelement");
   fail("Should have thrown an exception");
   }
   catch (java.util.NoSuchElementException nsee)
  -{}
  -
  +{
  +}
   }
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration NonStringTestHolder.java

2003-06-27 Thread mpoeschl
mpoeschl2003/06/27 13:03:45

  Modified:configuration/src/test/org/apache/commons/configuration
NonStringTestHolder.java
  Log:
  add license
  remove unused import
  
  Revision  ChangesPath
  1.2   +59 -7 
jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration/NonStringTestHolder.java
  
  Index: NonStringTestHolder.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration/NonStringTestHolder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NonStringTestHolder.java  20 Jun 2003 07:50:47 -  1.1
  +++ NonStringTestHolder.java  27 Jun 2003 20:03:45 -  1.2
  @@ -1,17 +1,69 @@
  -/*
  - * Created on Jun 20, 2003
  +package org.apache.commons.configuration;
  +
  +/* 
  + * 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 acknowlegement:
  + *   "This product includes software developed by the
  + *Apache Software Foundation (http://www.apache.org/)."
  + *Alternately, this acknowlegement may appear in the software itself,
  + *if and wherever such third-party acknowlegements 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 Group.
  + *
  + * 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.configuration;
  -import java.util.Iterator;
   
  -import org.apache.commons.collections.IteratorUtils;
  +import java.util.Iterator;
   
   import junit.framework.Assert;
  +
   /**
  + * Pulling out the calls to do the tests so both JUnit and Cactus tests 
  + * can share.
  + * 
* @author Eric Pugh
  - *
  - * Pulling out the calls to do the tests so both JUnit and Cactus tests can share.
  + * @version $Id$
*/
   public class NonStringTestHolder
   {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons-sandbox/configuration PROPOSAL.html

2003-06-16 Thread mpoeschl
mpoeschl2003/06/16 10:44:41

  Modified:configuration PROPOSAL.html
  Log:
  add myself as initial committer
  
  Revision  ChangesPath
  1.2   +1 -0  jakarta-commons-sandbox/configuration/PROPOSAL.html
  
  Index: PROPOSAL.html
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/PROPOSAL.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PROPOSAL.html 2 Jun 2003 20:54:33 -   1.1
  +++ PROPOSAL.html 16 Jun 2003 17:44:41 -  1.2
  @@ -62,6 +62,7 @@
   
   Eric Pugh (epugh)
   Henning P. Schmiedehausen (henning)
  +Martin Poeschl (mpoeschl)
   
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration TestBaseConfiguration.java

2003-02-06 Thread mpoeschl
mpoeschl2003/02/06 16:21:50

  Modified:configuration maven.xml project.xml
   configuration/src/java/org/apache/commons/configuration
BaseConfiguration.java
BasePropertiesConfiguration.java
   configuration/src/test/org/apache/commons/configuration
TestBaseConfiguration.java
  Log:
  Bugzilla Bug 16502 Enhancement: multiple interpolation
  patch by Jeff Barrett [[EMAIL PROTECTED]]
  
  Revision  ChangesPath
  1.3   +2 -2  jakarta-commons-sandbox/configuration/maven.xml
  
  Index: maven.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/maven.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- maven.xml 14 Dec 2002 11:43:32 -  1.2
  +++ maven.xml 7 Feb 2003 00:21:50 -   1.3
  @@ -9,7 +9,7 @@
   
   
 
  -
  +
 
   
 
  
  
  
  1.21  +6 -4  jakarta-commons-sandbox/configuration/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/project.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- project.xml   14 Jan 2003 03:53:12 -  1.20
  +++ project.xml   7 Feb 2003 00:21:50 -   1.21
  @@ -117,7 +117,7 @@
 3.8.1
 http://www.junit.org
   
  -
  +
 
   
 
  @@ -144,8 +144,10 @@
   
 
   **/*Test*.java
  -**/TestBasePropertiesConfiguration.java
 
  +  
  +**/TestBasePropertiesConfiguration.java
  +  
 
   
 conf
  
  
  
  1.10  +63 -4 
jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java
  
  Index: BaseConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BaseConfiguration.java22 Jan 2003 03:00:21 -  1.9
  +++ BaseConfiguration.java7 Feb 2003 00:21:50 -   1.10
  @@ -256,16 +256,41 @@
   store.put(key, obj);
   }
   
  + /**
  +  * interpolate key names to handle ${key} stuff
  +  */
  + protected String interpolate(String base )
  + {
  + return( interpolateHelper( base, null ) );
  + }
  +
   /**
  - * interpolate key names to handle ${key} stuff
  + * 
  + * Recursive handler for multple levels of interpolation.  
  + * 
  + * When called the first time, priorVariables should be null.
  + * 
  + * priorVariables serves two purposes: to allow checking for loops, and
  + * creating a meaningful exception message should a loop occur.  It's 0'th
  + * element will be set to the value of base from the first call.  All
  + * subsequent interpolated variables are added afterward.
  + * 
*/
  -protected String interpolate(String base)
  +protected String interpolateHelper(String base, List priorVariables )
   {
   if (base == null)
   {
   return null;
   }
   
  +// on the first call initialize priorVariables 
  +// and add base as the first element
  +if ( priorVariables == null)
  +{
  + priorVariables = new ArrayList();
  + priorVariables.add( base );
  +}
  +
   int begin = -1;
   int end = -1;
   int prec = 0 - END_TOKEN.length();
  @@ -278,9 +303,43 @@
   {
   result.append(base.substring(prec + END_TOKEN.length(), begin));
   variable = base.substring(begin + START_TOKEN.length(), end);
  +
  +// if we've got a loop, create a useful exception message and throw
  +if (priorVariables.contains(variable))
  +{
  + String initialBase = priorVariables.remove( 0 ).toString();
  + priorVariables.add( variable );
  + StringBuffer priorVariableSb = new StringBuffer();
  + 
  + // create a nice trace of interpolated variables like so:
  + // var1->var2->var3
  + for( Iterator it = priorVariables.iterator(); it.hasNext(); )
  + {
  +priorVariableSb.append( it.next() );
  +if ( it.hasNext() )
  +{
  + priorVariableSb.append( "->" );
  +}
  + }
  +
  + throw new IllegalStateException( "infi

cvs commit: jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration PropertiesConfiguration.java BaseConfiguration.java XmlConfiguration.java

2002-12-03 Thread mpoeschl
mpoeschl2002/12/03 06:13:55

  Modified:configuration/src/java/org/apache/commons/configuration
PropertiesConfiguration.java BaseConfiguration.java
XmlConfiguration.java
  Log:
  fix some checkstyle errors
  
  Revision  ChangesPath
  1.5   +5 -4  
jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
  
  Index: PropertiesConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PropertiesConfiguration.java  28 Aug 2002 19:43:13 -  1.4
  +++ PropertiesConfiguration.java  3 Dec 2002 14:13:55 -   1.5
  @@ -55,16 +55,17 @@
*/
   
   import java.io.File;
  -import java.io.*;
  +import java.io.FileInputStream;
  +import java.io.FileWriter;
  +import java.io.IOException;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  -import java.io.IOException;
   import java.io.LineNumberReader;
   import java.io.Reader;
   import java.io.UnsupportedEncodingException;
  +import java.util.Date;
   import java.util.Iterator;
   import org.apache.commons.lang.StringUtils;
  -import java.util.Date;
   
   /**
* loads the configuration from a properties file. 
  
  
  
  1.5   +17 -22
jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java
  
  Index: BaseConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BaseConfiguration.java3 Dec 2002 14:03:54 -   1.4
  +++ BaseConfiguration.java3 Dec 2002 14:13:55 -   1.5
  @@ -101,7 +101,9 @@
*/
   protected ArrayList keysAsListed = new ArrayList();
   
  +/** start token */
   protected static final String START_TOKEN = "${";
  +/** end token */
   protected static final String END_TOKEN = "}";
   
   /**
  @@ -131,7 +133,7 @@
   }
   else if (token instanceof Collection)
   {
  -for (Iterator it = ((Collection) token).iterator(); it.hasNext(); )
  +for (Iterator it = ((Collection) token).iterator(); it.hasNext();)
   {
   addProperty(key, it.next());
   }
  @@ -148,8 +150,8 @@
   if (o instanceof Container)
   {
   // There is already a container for our key in the config
  -// Simply add the new tokens 
  -for (Iterator it = tokenAdd.iterator(); it.hasNext(); )
  +// Simply add the new tokens
  +for (Iterator it = tokenAdd.iterator(); it.hasNext();)
   {
   ((Container) o).add(it.next());
   }
  @@ -167,7 +169,7 @@
   }
   
   // Now gobble up the supplied objects
  -for (Iterator it = tokenAdd.iterator(); it.hasNext(); )
  +for (Iterator it = tokenAdd.iterator(); it.hasNext();)
   {
   c.add(it.next());
   }
  @@ -557,7 +559,7 @@
   
   //
   // We must never give a Container Object out. So if the
  -// Return Value is a Container, we fix it up to be a 
  +// Return Value is a Container, we fix it up to be a
   // Vector
   //
   if (o instanceof Container)
  @@ -1311,14 +1313,14 @@
   }
   else
   {
  -v = ((defaultValue == null) ?
  - new Vector() : defaultValue);
  +v = ((defaultValue == null) ? new Vector() : defaultValue);
   }
   }
   else
   {
  -throw new ClassCastException(
  -'\'' + key + "' doesn't map to a Vector object: " + value + ", a " 
+ value.getClass().getName());
  +throw new ClassCastException('\'' + key
  ++ "' doesn't map to a Vector object: " + value + ", a "
  ++ value.getClass().getName());
   }
   return v;
   }
  @@ -1330,9 +1332,7 @@
*/
   class PropertiesTokenizer extends StringTokenizer
   {
  -/**
  - * The property delimiter used while parsing (a comma).
  - */
  +/** The property delimiter used while parsing (a comma). */
   static final String DELIMITER = ",";
   
   /**
  @@ -1378,14 +1378,13 @@
   break;
   }

cvs commit: jakarta-commons-sandbox/configuration/src/test/org/apache/commons/configuration include.properties TestPropertiesConfiguration.java test.properties

2002-12-03 Thread mpoeschl
mpoeschl2002/12/03 06:03:54

  Modified:configuration build.xml
   configuration/src/java/org/apache/commons/configuration
BaseConfiguration.java
   configuration/src/test/org/apache/commons/configuration
TestPropertiesConfiguration.java test.properties
  Added:   configuration/src/test/org/apache/commons/configuration
include.properties
  Log:
  I stumped over the following problem:
  foo.bar =   aaa
  foo.bar =   bbb, ccc
  I expected a Configuration object to return for getVector("foo.bar") :
  [ "aaa", "bbb", "ccc" ]
  but I got
  [ "aaa", "bbb, ccc" ]
  Which basically sucks and is not the expected behaviour. Then I took
  a look into BaseConfiguration (and recoiled in horror).
  The attached patch(es) fix up the mess surrounding the internal store,
  implement a Container wrapper for Vectors (as suggested in the comments)
  and return the correct values for the scenario described above.
  patch by Henning P. Schmiedehausen <[EMAIL PROTECTED]>
  i also added a unit test for the problem described
  
  Revision  ChangesPath
  1.4   +2 -0  jakarta-commons-sandbox/configuration/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml 28 Aug 2002 19:45:27 -  1.3
  +++ build.xml 3 Dec 2002 14:03:53 -   1.4
  @@ -130,6 +130,8 @@
   http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-2.0.jar";>
   http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-1.0-b1.jar";>
   http://www.ibiblio.org/maven/junit/jars/junit-3.7.jar";>
  +http://www.ibiblio.org/maven/xerces/jars/xercesImpl-2.0.2.jar";>
  +http://www.ibiblio.org/maven/xml-apis/jars/xmlParserAPIs-2.0.2.jar";>
 
 
   
  
  
  
  1.4   +218 -135  
jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java
  
  Index: BaseConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BaseConfiguration.java28 Aug 2002 18:16:02 -  1.3
  +++ BaseConfiguration.java3 Dec 2002 14:03:54 -   1.4
  @@ -55,8 +55,10 @@
*/
   
   import java.util.ArrayList;
  +import java.util.Collection;
   import java.util.Hashtable;
   import java.util.Iterator;
  +import java.util.List;
   import java.util.NoSuchElementException;
   import java.util.Properties;
   import java.util.StringTokenizer;
  @@ -81,6 +83,7 @@
* @author mailto:[EMAIL PROTECTED]";>Ilkka Priha
* @author mailto:[EMAIL PROTECTED]";>Jason van Zyl
* @author mailto:[EMAIL PROTECTED]";>Martin Poeschl
  + * @author mailto:[EMAIL PROTECTED]";>Henning P. Schmiedehausen
* @version $Id$
*/
   public class BaseConfiguration implements Configuration
  @@ -115,81 +118,118 @@
*
* ["file", "classpath"]
*
  - * @param key
  - * @param token
  + * @param key The Key to add the property to.
  + * @param token The Value to add.
*/
   public void addProperty(String key, Object token)
   {
  -Object o = store.get(key);
  +List tokenAdd = null;
   
  -/*
  - *  $$$ GMJ
  - *  FIXME : post 1.0 release, we need to not assume
  - *  that a scalar is a String - it can be an Object
  - *  so we should make a little vector-like class
  - *  say, Foo that wraps (not extends Vector),
  - *  so we can do things like
  - *  if ( !( o instanceof Foo) )
  - *  so we know it's our 'vector' container
  - *
  - *  This applies throughout
  - */
  -if (o instanceof String)
  +if (token instanceof String)
   {
  -Vector v = new Vector(2);
  -v.addElement(o);
  -v.addElement(token);
  -store.put(key, v);
  +tokenAdd = processString((String) token);
   }
  -else if (o instanceof Vector)
  +else if (token instanceof Collection)
   {
  -((Vector) o).addElement(token);
  +for (Iterator it = ((Collection) token).iterator(); it.hasNext(); )
  +{
  +addProperty(key, it.next());
  +}
  +return;
   }
   else
   {
  -/*
  - * This is the first time that we have seen request to 

cvs commit: jakarta-commons-sandbox/configuration/xdocs index.xml

2002-12-03 Thread mpoeschl
mpoeschl2002/12/03 04:31:11

  Modified:configuration/xdocs index.xml
  Log:
  change layout
  
  Revision  ChangesPath
  1.3   +10 -16jakarta-commons-sandbox/configuration/xdocs/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/xdocs/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml 28 Aug 2002 18:16:02 -  1.2
  +++ index.xml 3 Dec 2002 12:31:10 -   1.3
  @@ -10,22 +10,16 @@
   
 
   
  -  
  -ComponentDescription
  -
  -  Configuration
  -  
  -This code originated in JServ, was brought into Turbine,
  -moved to Velocity and improved, and then moved into the
  -Commons as ExtendedProperties. The code in
  -ExtendedProperties is a little unweildly and deals
  -specifically with properties files. We wanted to use a
  -general Configuration interface and allow the source of the
  -values to vary. Right now we only have the properties file
  -version working, but the XML configuration will soon work.
  -  
  -
  -  
  +  
  +This code originated in JServ, was brought into Turbine,
  +moved to Velocity and improved, and then moved into the
  +Commons as ExtendedProperties. The code in
  +ExtendedProperties is a little unweildly and deals
  +specifically with properties files. We wanted to use a
  +general Configuration interface and allow the source of the
  +values to vary. Right now we only have the properties file
  +version working, but the XML configuration will soon work.
  +  
   
 
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




cvs commit: jakarta-commons-sandbox/configuration project.xml

2002-12-03 Thread mpoeschl
mpoeschl2002/12/03 04:21:59

  Modified:configuration project.xml
  Log:
  fix unit tests
  
  Revision  ChangesPath
  1.11  +12 -3 jakarta-commons-sandbox/configuration/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml   28 Aug 2002 20:01:05 -  1.10
  +++ project.xml   3 Dec 2002 12:21:59 -   1.11
  @@ -76,6 +76,13 @@
 Multitask Consulting
   
   
  +
  +  Henning P. Schmiedehausen
  +  henning
  +  [EMAIL PROTECTED]
  +  INTERMETA - Gesellschaft fuer Mehrwertdienste mbH
  +
  +
 
   
 
  @@ -109,9 +116,11 @@
   
   
   
  -
  -  include = **/*Test*.java
  -
  +
  +  
  +**/*Test*.java
  +  
  +
   
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>