cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1087816 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java
Date Fri, 01 Apr 2011 17:16:30 GMT
Author: sergeyb
Date: Fri Apr  1 17:16:29 2011
New Revision: 1087816

URL: http://svn.apache.org/viewvc?rev=1087816&view=rev
Log:
Minor update to XMLSource

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java?rev=1087816&r1=1087815&r2=1087816&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java
Fri Apr  1 17:16:29 2011
@@ -374,20 +374,21 @@ public class XMLSource {
     }
     
     private InputSource getSource() {
-        try {
-            if (!markFailed && buffering) {
+        if (!markFailed && buffering) {
+            try {
+                stream.reset();
+                stream.mark(stream.available());
+            } catch (IOException ex) {
+                LOG.fine(new org.apache.cxf.common.i18n.Message("NO_SOURCE_MARK", BUNDLE).toString());
+                markFailed = true;
                 try {
-                    stream.reset();
-                    stream.mark(stream.available());
-                } catch (IOException ex) {
-                    markFailed = true;
-                    LOG.warning(new org.apache.cxf.common.i18n.Message("NO_SOURCE_MARK",
BUNDLE).toString());
                     stream = IOUtils.loadIntoBAIS(stream);
+                } catch (IOException ex2) {
+                    throw new RuntimeException(ex2);
                 }
             }
-        } catch (IOException ex) {
-            LOG.warning(new org.apache.cxf.common.i18n.Message("NO_SOURCE_MARK", BUNDLE).toString());
         }
+        
         return new InputSource(stream);
     }
 }



Mime
View raw message