commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject RE: cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration HierarchicalConfiguration.java
Date Sun, 14 Nov 2004 15:51:44 GMT
Welcome aboard Oliver!

Should we go through the bug list, clean it out and maybe release 1.0.1?
Build on the momentum of getting 1.0 out the door?  It would also allow us
to have a version released with no deprecated methods...

Eric

> -----Original Message-----
> From: oheger@apache.org [mailto:oheger@apache.org]
> Sent: Saturday, November 13, 2004 5:03 PM
> To: jakarta-commons-cvs@apache.org
> Subject: cvs commit:
> jakarta-commons/configuration/src/java/org/apache/commons/configuration
> HierarchicalConfiguration.java
>
>
> oheger      2004/11/13 09:02:51
>
>   Modified:    configuration/src/java/org/apache/commons/configuration
>                         HierarchicalConfiguration.java
>   Log:
>   Fix for Bug 31745
>
>   Revision  Changes    Path
>   1.13      +36 -2
> jakarta-commons/configuration/src/java/org/apache/commons/configur
> ation/HierarchicalConfiguration.java
>
>   Index: HierarchicalConfiguration.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-commons/configuration/src/java/org/apache/common
> s/configuration/HierarchicalConfiguration.java,v
>   retrieving revision 1.12
>   retrieving revision 1.13
>   diff -u -r1.12 -r1.13
>   --- HierarchicalConfiguration.java	18 Oct 2004 10:19:26 -0000	1.12
>   +++ HierarchicalConfiguration.java	13 Nov 2004 17:02:51 -0000	1.13
>   @@ -387,7 +387,7 @@
>         */
>        public Iterator getKeys(String prefix)
>        {
>   -        DefinedKeysVisitor visitor = new DefinedKeysVisitor();
>   +        DefinedKeysVisitor visitor = new DefinedKeysVisitor(prefix);
>            List nodes = fetchNodeList(prefix);
>            ConfigurationKey key = new ConfigurationKey();
>
>   @@ -990,6 +990,9 @@
>        {
>            /** Stores the list to be filled.*/
>            private Set keyList;
>   +
>   +        /** Stores a prefix for the keys.*/
>   +        private String prefix;
>
>            /**
>             * Default constructor.
>   @@ -998,6 +1001,18 @@
>            {
>                keyList = new HashSet();
>            }
>   +
>   +        /**
>   +         * Creates a new <code>DefinedKeysVisitor</code>
> instance and sets the
>   +         * prefix for the keys to fetch.
>   +         *
>   +         * @param prefix the prefix
>   +         */
>   +        public DefinedKeysVisitor(String prefix)
>   +        {
>   +            this();
>   +            this.prefix = prefix;
>   +        }
>
>            /**
>             * Returns the list with all defined keys.
>   @@ -1020,7 +1035,26 @@
>            {
>                if (node.getValue() != null && key != null)
>                {
>   +                addKey(key);
>   +            }
>   +        }
>   +
>   +        /**
>   +         * Adds the specified key to the internal list.
>   +         *
>   +         * @param key the key to add
>   +         */
>   +        protected void addKey(ConfigurationKey key)
>   +        {
>   +            if(prefix == null)
>   +            {
>                    keyList.add(key.toString());
>   +            }
>   +            else
>   +            {
>   +                StringBuffer buf = new StringBuffer(prefix);
>   +                buf.append('.').append(key);
>   +                keyList.add(buf.toString());
>                }
>            }
>        }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message