continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r495534 - /maven/continuum/trunk/continuum-data-management/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
Date Fri, 12 Jan 2007 09:56:20 GMT
Author: evenisse
Date: Fri Jan 12 01:56:19 2007
New Revision: 495534

URL: http://svn.apache.org/viewvc?view=rev&rev=495534
Log:
[CONTINUUM-1136] Relying on default charset while backing up continuum store
Submitted by: Marcelo Takeshi Fukushima

Modified:
    maven/continuum/trunk/continuum-data-management/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java

Modified: maven/continuum/trunk/continuum-data-management/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-data-management/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java?view=diff&rev=495534&r1=495533&r2=495534
==============================================================================
--- maven/continuum/trunk/continuum-data-management/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
(original)
+++ maven/continuum/trunk/continuum-data-management/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
Fri Jan 12 01:56:19 2007
@@ -39,9 +39,13 @@
 import javax.jdo.PersistenceManagerFactory;
 import javax.xml.stream.XMLStreamException;
 import java.io.File;
+import java.io.FileOutputStream;
 import java.io.FileReader;
-import java.io.FileWriter;
 import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -82,7 +86,10 @@
         database.setProfiles( store.getAllProfilesByName() );
 
         ContinuumStaxWriter writer = new ContinuumStaxWriter();
-        FileWriter fileWriter = new FileWriter( new File( backupDirectory, BUILDS_XML ) );
+
+        OutputStream out = new FileOutputStream( new File( backupDirectory, BUILDS_XML )
);
+        Writer fileWriter = new OutputStreamWriter( out, Charset.forName( database.getModelEncoding()
) );
+
         try
         {
             writer.write( fileWriter, database );



Mime
View raw message