You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2003/01/25 13:21:20 UTC

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections ExtendedProperties.java

scolebourne    2003/01/25 04:21:19

  Modified:    collections/src/java/org/apache/commons/collections
                        ExtendedProperties.java
  Log:
  Fix initialized flag so it actually gets set
  from Walt, fixes bug #16225
  
  Revision  Changes    Path
  1.8       +21 -23    jakarta-commons/collections/src/java/org/apache/commons/collections/ExtendedProperties.java
  
  Index: ExtendedProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ExtendedProperties.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ExtendedProperties.java	12 Jun 2002 03:59:15 -0000	1.7
  +++ ExtendedProperties.java	25 Jan 2003 12:21:19 -0000	1.8
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -23,11 +20,11 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:
  + *    any, must include the following acknowledgment:
    *       "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.
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  @@ -36,7 +33,7 @@
    *
    * 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.
  + *    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
  @@ -58,7 +55,6 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections;
   
   import java.io.IOException;
  @@ -162,8 +158,9 @@
    * much time to improve it), I wrote it this way.  If you don't like
    * it, go ahead and tune it up!
    *
  - *
    * @since 1.0
  + * @version $Revision$ $Date$
  + * 
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
    * @author <a href="mailto:daveb@miceda-data">Dave Bryson</a>
  @@ -173,7 +170,6 @@
    * @author <a href="mailto:kjohnson@transparent.com">Kent Johnson</a>
    * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    * @author <a href="mailto:ipriha@surfeu.fi">Ilkka Priha</a>
  - * @version $Id$
    */
   public class ExtendedProperties extends Hashtable
   {
  @@ -414,17 +410,6 @@
       }
   
       /**
  -     * Private initializer method that sets up the generic
  -     * resources.
  -     *
  -     * @exception IOException, if there was an I/O problem.
  -     */
  -    private void init( ExtendedProperties exp ) throws IOException
  -    {
  -        isInitialized = true;
  -    }
  -    
  -    /**
        * Indicate to client code whether property
        * resources have been initialized or not.
        */
  @@ -568,6 +553,13 @@
                */
               return;
           }
  +        finally
  +        {
  +            /*
  +             * Loading is initializing
  +             */
  +            isInitialized = true;
  +        }
       }
   
       /**
  @@ -695,6 +687,12 @@
                   addPropertyDirect( key, token );
               }                
           }
  +        
  +        /*
  +         * Adding a property connotes initialization
  +         */
  +        isInitialized = true;
  +        
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>