You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ke...@apache.org on 2011/06/23 22:23:55 UTC
svn commit: r1139065 - in /geronimo/server/trunk/framework/modules:
geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/
geronimo-system/src/main/java/org/apache/geronimo/system/configuration/
Author: kevan
Date: Thu Jun 23 20:23:54 2011
New Revision: 1139065
URL: http://svn.apache.org/viewvc?rev=1139065&view=rev
Log:
GERONIMO-6021 read and write the config.info file using UTF-8 encoding
Modified:
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=1139065&r1=1139064&r2=1139065&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java Thu Jun 23 20:23:54 2011
@@ -19,6 +19,7 @@ package org.apache.geronimo.kernel.confi
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.JarURLConnection;
@@ -249,7 +250,8 @@ public final class ConfigurationUtil {
public static ConfigurationInfo readConfigurationInfo(InputStream in, AbstractName storeName, File inPlaceLocation) throws IOException {
Properties properties = new Properties();
- properties.load(in);
+ // file is written with UTF-8
+ properties.load(new InputStreamReader(in, "UTF-8"));
return readConfigurationInfo("", properties, storeName, inPlaceLocation);
}
Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java?rev=1139065&r1=1139064&r2=1139065&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java Thu Jun 23 20:23:54 2011
@@ -203,7 +203,7 @@ public final class ExecutableConfigurati
// write the info file
try {
- writer = new PrintWriter(new FileWriter(new File(metaInf, CONFIG_INFO)));
+ writer = new PrintWriter(new File(metaInf, CONFIG_INFO), "UTF-8");
ConfigurationUtil.writeConfigInfo(writer, configurationData);
} finally {
flush(writer);