onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r1415114 - /incubator/onami/trunk/autobind/configuration/src/main/java/org/nnsoft/guice/autobind/configuration/PropertiesReader.java
Date Thu, 29 Nov 2012 10:17:44 GMT
Author: grobmeier
Date: Thu Nov 29 10:17:43 2012
New Revision: 1415114

URL: http://svn.apache.org/viewvc?rev=1415114&view=rev
Log:
updated to reflect recent Configuration (Rocoto) developments, still fails to compile because
ConfigurationReader does not resolve

Modified:
    incubator/onami/trunk/autobind/configuration/src/main/java/org/nnsoft/guice/autobind/configuration/PropertiesReader.java

Modified: incubator/onami/trunk/autobind/configuration/src/main/java/org/nnsoft/guice/autobind/configuration/PropertiesReader.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/autobind/configuration/src/main/java/org/nnsoft/guice/autobind/configuration/PropertiesReader.java?rev=1415114&r1=1415113&r2=1415114&view=diff
==============================================================================
--- incubator/onami/trunk/autobind/configuration/src/main/java/org/nnsoft/guice/autobind/configuration/PropertiesReader.java
(original)
+++ incubator/onami/trunk/autobind/configuration/src/main/java/org/nnsoft/guice/autobind/configuration/PropertiesReader.java
Thu Nov 29 10:17:43 2012
@@ -18,11 +18,13 @@ package org.nnsoft.guice.autobind.config
  */
 
 import java.net.URL;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 
-import org.nnsoft.guice.rocoto.variables.VariablesMap;
+import org.apache.onami.configuration.configuration.PropertiesURLReader;
 
 public class PropertiesReader
     implements ConfigurationReader
@@ -30,9 +32,9 @@ public class PropertiesReader
 
     private final PropertiesURLReader reader;
 
-    public PropertiesReader( URL url, boolean isXML )
+    public PropertiesReader( URL url )
     {
-        reader = new PropertiesURLReader( url, isXML );
+        reader = new PropertiesURLReader( url );
     }
 
     public Properties readNative()
@@ -40,21 +42,17 @@ public class PropertiesReader
     {
         Properties properties = new Properties();
 
-        Iterator<Entry<String, String>> configuration = reader.readConfiguration();
-        for ( Entry<String, String> entry; configuration.hasNext(); )
-        {
-            entry = configuration.next();
-            properties.setProperty( entry.getKey(), entry.getValue() );
-        }
-
-        return properties;
+        return  reader.readConfiguration();
     }
 
     @Override
     public Iterator<Entry<String, String>> readConfiguration()
         throws Exception
     {
-        return reader.readConfiguration();
+        Properties properties = reader.readConfiguration();
+        Map<String, String> result = new HashMap<String, String>();
+        properties.putAll(result);
+        return result.entrySet().iterator();
     }
 
 }



Mime
View raw message