activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r534086 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
Date Tue, 01 May 2007 13:46:13 GMT
Author: jstrachan
Date: Tue May  1 06:46:12 2007
New Revision: 534086

URL: http://svn.apache.org/viewvc?view=rev&rev=534086
Log:
removed wrapped exception

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java?view=diff&rev=534086&r1=534085&r2=534086
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
Tue May  1 06:46:12 2007
@@ -17,29 +17,27 @@
  */
 package org.apache.camel.builder.xml;
 
-import static org.apache.camel.util.ObjectHelper.notNull;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExpectedBodyTypeException;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeTransformException;
-import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.converter.jaxp.XmlConverter;
+import static org.apache.camel.util.ObjectHelper.notNull;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Result;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.stream.StreamSource;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Creates a <a href="http://activemq.apache.org/camel/processor.html">Processor</a>
@@ -66,7 +64,7 @@
         return "XSLT[" + transformer + "]";
     }
 
-    public synchronized void process(E exchange) {
+    public synchronized void process(E exchange) throws Exception {
         Transformer transformer = getTransformer();
         if (transformer == null) {
             throw new IllegalArgumentException("No transformer configured!");
@@ -74,7 +72,7 @@
         configureTransformer(transformer, exchange);
         Source source = getSource(exchange);
         Result result = resultHandler.getResult();
-        transform(transformer, source, result);
+        transformer.transform(source, result);
         resultHandler.setBody(exchange.getIn());
     }
 
@@ -151,7 +149,6 @@
         return this;
     }
 
-
     // Properties
     //-------------------------------------------------------------------------
 
@@ -191,7 +188,6 @@
         setTransformer(converter.getTransformerFactory().newTransformer(source));
     }
 
-
     // Implementation methods
     // -------------------------------------------------------------------------
 
@@ -215,18 +211,6 @@
             }
         }
         return source;
-    }
-
-    /**
-     * Performs the transformation, wrapping any thrown exceptions
-     */
-    protected void transform(Transformer transformer, Source source, Result result) {
-        try {
-            transformer.transform(source, result);
-        }
-        catch (TransformerException e) {
-            throw new RuntimeTransformException(e);
-        }
     }
 
     /**



Mime
View raw message