geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r1141375 - /geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
Date Thu, 30 Jun 2011 03:12:35 GMT
Author: kevan
Date: Thu Jun 30 03:12:34 2011
New Revision: 1141375

URL: http://svn.apache.org/viewvc?rev=1141375&view=rev
Log:
clean up java 6 dependency

Modified:
    geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java

Modified: geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=1141375&r1=1141374&r2=1141375&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
(original)
+++ geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
Thu Jun 30 03:12:34 2011
@@ -244,7 +244,14 @@ public final class ConfigurationUtil {
     public static ConfigurationInfo readConfigurationInfo(InputStream in, AbstractName storeName,
File inPlaceLocation) throws IOException {
         Properties properties = new Properties();
         // file is written with UTF-8
-        properties.load(new InputStreamReader(in, "UTF-8"));
+        properties.load(in);
+
+        for (Object key : properties.keySet()) {
+            String val = properties.getProperty(key.toString());
+            String goodVal = new String(val.getBytes("iso8859-1"), "utf-8");
+            properties.setProperty(key.toString(), goodVal);
+        }
+
         return readConfigurationInfo("", properties, storeName, inPlaceLocation);
     }
 



Mime
View raw message