cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1356832 - /cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
Date Tue, 03 Jul 2012 16:59:31 GMT
Author: sergeyb
Date: Tue Jul  3 16:59:30 2012
New Revision: 1356832

URL: http://svn.apache.org/viewvc?rev=1356832&view=rev
Log:
Updating WadlToJava container to read the WADL files using UTF-8

Modified:
    cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java

Modified: cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java?rev=1356832&r1=1356831&r2=1356832&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
(original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
Tue Jul  3 16:59:30 2012
@@ -21,6 +21,8 @@ package org.apache.cxf.tools.wadlto.jaxr
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
 import java.net.URL;
 import java.util.Collections;
 import java.util.HashSet;
@@ -29,6 +31,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.xml.sax.InputSource;
+
 import org.apache.cxf.common.util.URIParserUtil;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.tools.common.AbstractCXFToolContainer;
@@ -178,7 +181,8 @@ public class JAXRSContainer extends Abst
     protected String readWadl(String wadlURI) {
         try {
             URL url = new URL(wadlURI);
-            return IOUtils.toString(url.openStream());
+            Reader reader = new InputStreamReader(url.openStream(), "UTF-8");
+            return IOUtils.toString(reader);
         } catch (IOException e) {
             throw new ToolException(e);
         }



Mime
View raw message