db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r433728 - in /db/torque: generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java site/trunk/xdocs/changes.xml
Date Tue, 22 Aug 2006 19:05:49 GMT
Author: tfischer
Date: Tue Aug 22 12:05:48 2006
New Revision: 433728

URL: http://svn.apache.org/viewvc?rev=433728&view=rev
Log:
Respect encoding in header of schema xml file.
Thanks to Thoralf Rickert for reporting the bug.
Fixes TORQUE-49.

Modified:
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
    db/torque/site/trunk/xdocs/changes.xml

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java?rev=433728&r1=433727&r2=433728&view=diff
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
Tue Aug 22 12:05:48 2006
@@ -16,10 +16,10 @@
  * limitations under the License.
  */
 
-import java.io.BufferedReader;
+import java.io.BufferedInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.util.Stack;
 import java.util.Vector;
 
@@ -144,27 +144,28 @@
 
             SAXParser parser = saxFactory.newSAXParser();
 
-            FileReader fr = null;
+            FileInputStream fileInputStream = null;
             try
             {
-                fr = new FileReader(xmlFile);
+                fileInputStream = new FileInputStream(xmlFile);
             }
             catch (FileNotFoundException fnfe)
             {
                 throw new FileNotFoundException
                     (new File(xmlFile).getAbsolutePath());
             }
-            BufferedReader br = new BufferedReader(fr);
+            BufferedInputStream bufferedInputStream 
+                    = new BufferedInputStream(fileInputStream);
             try
             {
                 log.info("Parsing file: '"
                         + (new File(xmlFile)).getName() + "'");
-                InputSource is = new InputSource(br);
+                InputSource is = new InputSource(bufferedInputStream);
                 parser.parse(is, this);
             }
             finally
             {
-                br.close();
+                bufferedInputStream.close();
             }
         }
         catch (SAXParseException e)

Modified: db/torque/site/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/xdocs/changes.xml?rev=433728&r1=433727&r2=433728&view=diff
==============================================================================
--- db/torque/site/trunk/xdocs/changes.xml (original)
+++ db/torque/site/trunk/xdocs/changes.xml Tue Aug 22 12:05:48 2006
@@ -29,6 +29,10 @@
 
   <release version="3.2.1-dev" date="in SVN">
   
+    <action type="fix" dev="tfischer" issue="TORQUE-49">
+      Use encoding in the header of schema.xml files instead of default encoding
+      to parse the schema.xml files.
+    </action>
     <action type="update" dev="tfischer" issue="TORQUE-31" due-to="Thoralf Rickert">
       Provided generic typed wrappers for methods in BasePeer
       when torque.enableJava5Features is set to true.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message