This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit bcd1044310c36c5fba70aca7253cd76e7b82a5f9
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Thu Nov 24 14:56:52 2022 +0100

    (chores) removed unused exceptions in core
---
 .../src/main/java/org/apache/camel/util/IOHelper.java        |  2 +-
 .../src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java  |  2 +-
 .../java/org/apache/camel/converter/jaxp/XmlConverter.java   | 12 ++++++------
 .../org/apache/camel/util/xml/StreamSourceConverter.java     |  3 +--
 4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java 
b/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
index f4de4d0e17b..b6d9b8f9e6d 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
@@ -724,7 +724,7 @@ public final class IOHelper {
         return IOHelper.buffered(new EncodingFileWriter(os, charset));
     }
 
-    public static BufferedWriter toWriter(FileOutputStream os, Charset 
charset) throws IOException {
+    public static BufferedWriter toWriter(FileOutputStream os, Charset 
charset) {
         return IOHelper.buffered(new EncodingFileWriter(os, charset));
     }
 }
diff --git 
a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java 
b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
index d140de5e6b9..460c5df1bbe 100644
--- 
a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
+++ 
b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
@@ -169,7 +169,7 @@ public final class JaxbHelper {
      * @param document   the DOM document
      * @param namespaces the map of namespaces to add new found XML namespaces
      */
-    public static void extractNamespaces(Document document, Map<String, 
String> namespaces) throws JAXBException {
+    public static void extractNamespaces(Document document, Map<String, 
String> namespaces) {
         NamedNodeMap attributes = 
document.getDocumentElement().getAttributes();
         for (int i = 0; i < attributes.getLength(); i++) {
             Node item = attributes.item(i);
diff --git 
a/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
 
b/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
index 5556b6f1b73..94f4ab4ff58 100644
--- 
a/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
+++ 
b/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
@@ -297,7 +297,7 @@ public class XmlConverter {
      * easy to derive from this class to add new kinds of conversion).
      */
     @Converter(order = 15)
-    public SAXSource toSAXSource(String source, Exchange exchange) throws 
IOException, SAXException, TransformerException {
+    public SAXSource toSAXSource(String source, Exchange exchange) throws 
SAXException, TransformerException {
         return toSAXSource(toSource(source), exchange);
     }
 
@@ -326,7 +326,7 @@ public class XmlConverter {
      * easy to derive from this class to add new kinds of conversion).
      */
     @Converter(order = 18)
-    public SAXSource toSAXSource(InputStream source, Exchange exchange) throws 
IOException, SAXException, TransformerException {
+    public SAXSource toSAXSource(InputStream source, Exchange exchange) throws 
SAXException, TransformerException {
         return toSAXSource(toStreamSource(source), exchange);
     }
 
@@ -335,7 +335,7 @@ public class XmlConverter {
      * easy to derive from this class to add new kinds of conversion).
      */
     @Converter(order = 19)
-    public SAXSource toSAXSource(byte[] in, Exchange exchange) throws 
IOException, SAXException, TransformerException {
+    public SAXSource toSAXSource(byte[] in, Exchange exchange) throws 
SAXException, TransformerException {
         return toSAXSource(toStreamSource(in, exchange), exchange);
     }
 
@@ -391,13 +391,13 @@ public class XmlConverter {
     }
 
     @Converter(order = 27)
-    public StreamSource toStreamSource(byte[] in, Exchange exchange) throws 
TransformerException {
+    public StreamSource toStreamSource(byte[] in, Exchange exchange) {
         InputStream is = 
exchange.getContext().getTypeConverter().convertTo(InputStream.class, exchange, 
in);
         return new StreamSource(is);
     }
 
     @Converter(order = 28)
-    public StreamSource toStreamSource(ByteBuffer in, Exchange exchange) 
throws TransformerException {
+    public StreamSource toStreamSource(ByteBuffer in, Exchange exchange) {
         InputStream is = 
exchange.getContext().getTypeConverter().convertTo(InputStream.class, exchange, 
in);
         return new StreamSource(is);
     }
@@ -829,7 +829,7 @@ public class XmlConverter {
      * easy to derive from this class to add new kinds of conversion).
      */
     @Converter(order = 64)
-    public SAXSource toSAXSource(Source source, Exchange exchange) throws 
IOException, SAXException, TransformerException {
+    public SAXSource toSAXSource(Source source, Exchange exchange) throws 
SAXException, TransformerException {
         if (source instanceof SAXSource) {
             return (SAXSource) source;
         } else if (source instanceof DOMSource) {
diff --git 
a/core/camel-xml-jaxp/src/main/java/org/apache/camel/util/xml/StreamSourceConverter.java
 
b/core/camel-xml-jaxp/src/main/java/org/apache/camel/util/xml/StreamSourceConverter.java
index 2b3fb90002f..994711efe67 100644
--- 
a/core/camel-xml-jaxp/src/main/java/org/apache/camel/util/xml/StreamSourceConverter.java
+++ 
b/core/camel-xml-jaxp/src/main/java/org/apache/camel/util/xml/StreamSourceConverter.java
@@ -19,7 +19,6 @@ package org.apache.camel.util.xml;
 import java.io.IOException;
 import java.io.Serializable;
 
-import javax.xml.transform.TransformerException;
 import javax.xml.transform.sax.SAXSource;
 import javax.xml.transform.stream.StreamSource;
 
@@ -54,7 +53,7 @@ public final class StreamSourceConverter {
     }
 
     @Converter(order = 3)
-    public static StreamCache convertToStreamCache(SAXSource source, Exchange 
exchange) throws TransformerException {
+    public static StreamCache convertToStreamCache(SAXSource source, Exchange 
exchange) {
         String data = 
exchange.getContext().getTypeConverter().convertTo(String.class, exchange, 
source);
         return new SourceCache(data);
     }

Reply via email to