commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1004878 - /commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
Date Wed, 06 Oct 2010 02:23:13 GMT
Author: niallp
Date: Wed Oct  6 02:23:13 2010
New Revision: 1004878

URL: http://svn.apache.org/viewvc?rev=1004878&view=rev
Log:
Minor formatting changes

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java?rev=1004878&r1=1004877&r2=1004878&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
(original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
Wed Oct  6 02:23:13 2010
@@ -367,17 +367,14 @@ public class XmlStreamReader extends Rea
      */
     private String doLenientDetection(String httpContentType, InputStream is,
             XmlStreamReaderException ex) throws IOException {
-        if (httpContentType != null) {
-            if (httpContentType.startsWith("text/html")) {
-                httpContentType = httpContentType.substring("text/html"
-                        .length());
-                httpContentType = "text/xml" + httpContentType;
-                try {
-                    return calculateHttpEncoding(httpContentType, ex.getBomEncoding(),
-                            ex.getXmlGuessEncoding(), ex.getXmlEncoding(), true);
-                } catch (XmlStreamReaderException ex2) {
-                    ex = ex2;
-                }
+        if (httpContentType != null && httpContentType.startsWith("text/html")) {
+            httpContentType = httpContentType.substring("text/html".length());
+            httpContentType = "text/xml" + httpContentType;
+            try {
+                return calculateHttpEncoding(httpContentType, ex.getBomEncoding(),
+                        ex.getXmlGuessEncoding(), ex.getXmlEncoding(), true);
+            } catch (XmlStreamReaderException ex2) {
+                ex = ex2;
             }
         }
         String encoding = ex.getXmlEncoding();



Mime
View raw message