ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1849629 - in /webservices/axiom/trunk: axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java axiom-api/src/main/java/org/apache/axiom/om/OMSerializable.java axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/JAXBOMDataSource.java
Date Sun, 23 Dec 2018 14:19:43 GMT
Author: veithen
Date: Sun Dec 23 14:19:43 2018
New Revision: 1849629

URL: http://svn.apache.org/viewvc?rev=1849629&view=rev
Log:
Clarify what type of exceptions should be thrown by OMDataSource.serialize(XMLStreamWriter).

Modified:
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMSerializable.java
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/JAXBOMDataSource.java

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java?rev=1849629&r1=1849628&r2=1849629&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
Sun Dec 23 14:19:43 2018
@@ -150,11 +150,12 @@ public interface OMDataSource {
      * the data source also implements {@link OMDataSourceExt} and
      * {@link OMDataSourceExt#isDestructiveWrite()} returns <code>false</code>.
      * 
-     * @param xmlWriter
+     * @param writer
      *            destination writer
-     * @throws XMLStreamException
+     * @throws XMLStreamException if an exception was thrown by {@code writer}; implementations
+     *                            should throw unchecked exceptions in all other cases
      */
-    void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException;
+    void serialize(XMLStreamWriter writer) throws XMLStreamException;
 
     /**
      * Get parser for element data. In the general case this may require the data source
to

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMSerializable.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMSerializable.java?rev=1849629&r1=1849628&r2=1849629&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMSerializable.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMSerializable.java
Sun Dec 23 14:19:43 2018
@@ -121,10 +121,10 @@ public interface OMSerializable extends
      * repairing.
      * </ul>
      * 
-     * @param xmlWriter
+     * @param writer
      * @param cache
      *            indicates if caching should be enabled
-     * @throws XMLStreamException
+     * @throws XMLStreamException if an exception was thrown by {@code writer}
      */
-    void serialize(XMLStreamWriter xmlWriter, boolean cache) throws XMLStreamException;
+    void serialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException;
 }

Modified: webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/JAXBOMDataSource.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/JAXBOMDataSource.java?rev=1849629&r1=1849628&r2=1849629&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/JAXBOMDataSource.java
(original)
+++ webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/JAXBOMDataSource.java
Sun Dec 23 14:19:43 2018
@@ -97,7 +97,7 @@ public class JAXBOMDataSource extends Ab
                 }
                 cause = cause.getCause();
             }
-            throw new XMLStreamException("Error marshalling JAXB object", ex);
+            throw new OMException("Error marshalling JAXB object", ex);
         }
     }
 



Mime
View raw message