commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration HierarchicalConfigurationConverter.java
Date Mon, 23 Aug 2004 08:06:23 GMT
ebourg      2004/08/23 01:06:22

  Modified:    configuration/src/java/org/apache/commons/configuration
                        HierarchicalConfigurationConverter.java
  Log:
  Removed some unnecessary code (Oliver Heger)
  
  Revision  Changes    Path
  1.5       +8 -19     jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalConfigurationConverter.java
  
  Index: HierarchicalConfigurationConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalConfigurationConverter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HierarchicalConfigurationConverter.java	20 Aug 2004 15:49:27 -0000	1.4
  +++ HierarchicalConfigurationConverter.java	23 Aug 2004 08:06:22 -0000	1.5
  @@ -71,10 +71,7 @@
                   ConfigurationKey keyAct = new ConfigurationKey(key);
                   closeElements(keyLast, keyAct);
                   String elem = openElements(keyLast, keyAct, config, keySet);
  -                if (elem != null)
  -                {
  -                	fireValue(elem, config.getProperty(key));
  -                }
  +               	fireValue(elem, config.getProperty(key));
                   keyLast = keyAct;
               }
   
  @@ -165,22 +162,14 @@
       protected String openElements(ConfigurationKey keyLast, ConfigurationKey keyAct, Configuration
config, Set keySet)
       {
           ConfigurationKey.KeyIterator it = keyLast.differenceKey(keyAct).iterator();
  -
  -        if(it.hasNext())
  -        {
  -        	ConfigurationKey k = keyLast.commonKey(keyAct);
  -	        for (it.nextKey(); it.hasNext(); it.nextKey())
  -	        {
  -	        	k.append(it.currentKey(true));
  -	            elementStart(it.currentKey(true), config.getProperty(k.toString()));
  -	            keySet.add(k.toString());
  -	        }
  -	        return it.currentKey(true);
  -        }
  -        else
  +    	ConfigurationKey k = keyLast.commonKey(keyAct);
  +        for (it.nextKey(); it.hasNext(); it.nextKey())
           {
  -        	return null;
  +        	k.append(it.currentKey(true));
  +            elementStart(it.currentKey(true), config.getProperty(k.toString()));
  +            keySet.add(k.toString());
           }
  +        return it.currentKey(true);
       }
   
       /**
  
  
  

---------------------------------------------------------------------
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