camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r749357 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: converter/jaxp/XmlConverter.java processor/DelayProcessorSupport.java view/GraphGeneratorSupport.java
Date Mon, 02 Mar 2009 16:48:54 GMT
Author: davsclaus
Date: Mon Mar  2 16:48:54 2009
New Revision: 749357

URL: http://svn.apache.org/viewvc?rev=749357&view=rev
Log:
CAMEL-588: Fixed package tangling and wrong logger class used.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelayProcessorSupport.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java?rev=749357&r1=749356&r2=749357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
Mon Mar  2 16:48:54 2009
@@ -53,8 +53,7 @@
 import org.xml.sax.XMLReader;
 
 import org.apache.camel.Converter;
-import org.apache.camel.converter.IOConverter;
-import org.apache.camel.converter.NIOConverter;
+import org.apache.camel.Exchange;
 import org.apache.camel.util.ObjectHelper;
 
 
@@ -292,17 +291,19 @@
     }
 
     @Converter
-    public StreamSource toStreamSource(byte[] in) throws TransformerException {
+    public StreamSource toStreamSource(byte[] in, Exchange exchange) throws TransformerException
{
         if (in != null) {
-            return new StreamSource(IOConverter.toInputStream(in));
+            InputStream is = exchange.getContext().getTypeConverter().convertTo(InputStream.class,
in);
+            return new StreamSource(is);
         }
         return null;
     }
 
     @Converter
-    public StreamSource toStreamSource(ByteBuffer in) throws TransformerException {
+    public StreamSource toStreamSource(ByteBuffer in, Exchange exchange) throws TransformerException
{
         if (in != null) {
-            return new StreamSource(NIOConverter.toInputStream(in));
+            InputStream is = exchange.getContext().getTypeConverter().convertTo(InputStream.class,
in);
+            return new StreamSource(is);
         }
         return null;
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelayProcessorSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelayProcessorSupport.java?rev=749357&r1=749356&r2=749357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelayProcessorSupport.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelayProcessorSupport.java
Mon Mar  2 16:48:54 2009
@@ -32,7 +32,7 @@
  * @version $Revision$
  */
 public abstract class DelayProcessorSupport extends DelegateProcessor {
-    private static final transient Log LOG = LogFactory.getLog(Delayer.class);
+    protected final transient Log log = LogFactory.getLog(getClass());
     private CountDownLatch stoppedLatch = new CountDownLatch(1);
     private boolean fastStop = true;
 
@@ -95,8 +95,8 @@
         if (delay <= 0) {
             return;
         }
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Sleeping for: " + delay + " millis");
+        if (log.isTraceEnabled()) {
+            log.trace("Sleeping for: " + delay + " millis");
         }
         if (isFastStop()) {
             stoppedLatch.await(delay, TimeUnit.MILLISECONDS);
@@ -110,7 +110,9 @@
      * case differently
      */
     protected void handleSleepInteruptedException(InterruptedException e) {
-        LOG.debug("Sleep interrupted, are we stopping? " + (isStopping() || isStopped()));
+        if (log.isDebugEnabled()) {
+            log.debug("Sleep interrupted, are we stopping? " + (isStopping() || isStopped()));
+        }
     }
 
     protected long currentSystemTime() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java?rev=749357&r1=749356&r2=749357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java
Mon Mar  2 16:48:54 2009
@@ -43,7 +43,7 @@
  * @version $Revision$
  */
 public abstract class GraphGeneratorSupport {
-    private static final transient Log LOG = LogFactory.getLog(RouteDotGenerator.class);
+    protected final transient Log log = LogFactory.getLog(getClass());
     protected String dir;
     protected int clusterCounter;
     protected String extension;



Mime
View raw message