clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r954430 - /incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
Date Mon, 14 Jun 2010 12:34:08 GMT
Author: reto
Date: Mon Jun 14 12:34:08 2010
New Revision: 954430

URL: http://svn.apache.org/viewvc?rev=954430&view=rev
Log:
generated class files to be in utf-8

Modified:
    incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java

Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java?rev=954430&r1=954429&r2=954430&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
(original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.maven-ontologies-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
Mon Jun 14 12:34:08 2010
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URISyntaxException;
 import java.net.URL;
@@ -185,10 +186,13 @@ public class OntologyJavaClassCreatorMoj
 		dir.mkdirs();
 		PrintWriter out = null;
 		try {
-			out = new PrintWriter(new File(rootPath + pathToJavaClass + className + ".java"));
+			out = new PrintWriter(new File(rootPath + pathToJavaClass + className + ".java"), "utf-8");
 		} catch (FileNotFoundException e) {
 			getLog().error(e.getMessage(), e);
 			return;
+		} catch (UnsupportedEncodingException e) {
+			getLog().error(e.getMessage(), e);
+			throw new RuntimeException("utf-8 not supported!");
 		}
 		try {
 			schemaGen.writeClass(out);



Mime
View raw message