You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/03/18 12:37:32 UTC

[1/6] camel git commit: CAMEL-8487 Support to configure the custom arguments on the RabbitMQ queues and exchange

Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 3ab1c2089 -> 238ff59bb
  refs/heads/camel-2.15.x 469a7b334 -> 61e7fc84e


CAMEL-8487 Support to configure the custom arguments on the RabbitMQ queues and exchange


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0c1f31c5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0c1f31c5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0c1f31c5

Branch: refs/heads/camel-2.15.x
Commit: 0c1f31c52ae962c6396e781d0ce9a5603e4e59c7
Parents: 469a7b3
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Mar 16 15:58:31 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:34:54 2015 +0800

----------------------------------------------------------------------
 .../component/rabbitmq/ArgsConfigurer.java      | 29 +++++++++++
 .../component/rabbitmq/RabbitMQEndpoint.java    | 54 ++++++++++++++++++--
 .../rabbitmq/RabbitMQEndpointTest.java          | 21 +++++++-
 3 files changed, 99 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0c1f31c5/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/ArgsConfigurer.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/ArgsConfigurer.java b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/ArgsConfigurer.java
new file mode 100644
index 0000000..71fd212
--- /dev/null
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/ArgsConfigurer.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.rabbitmq;
+
+import java.util.Map;
+
+public interface ArgsConfigurer {
+    
+    /**
+     * Configure the args maps for RabbitMQ to use
+     * @param args the map need to be configured
+     */
+    void configurArgs(Map<String, Object> args);
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/0c1f31c5/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
index f6e4198..ea311d7 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
@@ -72,6 +72,7 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
     private boolean durable = true;
     @UriParam(defaultValue = "false")
     private boolean bridgeEndpoint;
+    @UriParam
     private String queue = String.valueOf(UUID.randomUUID().toString().hashCode());
     @UriParam(defaultValue = "direct")
     private String exchangeType = "direct";
@@ -138,6 +139,10 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
     //Maximum time (in milliseconds) waiting for channel
     @UriParam(defaultValue = "1000")
     private long channelPoolMaxWait = 1000;
+    @UriParam
+    private ArgsConfigurer queueArgsConfigurer;
+    @UriParam
+    private ArgsConfigurer exchangeArgsConfigurer;
 
     public RabbitMQEndpoint() {
     }
@@ -197,12 +202,13 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
      * If needed, declare Exchange, declare Queue and bind them with Routing Key
      */
     public void declareExchangeAndQueue(Channel channel) throws IOException {
-        HashMap<String, Object> queueArgs = null;
+        Map<String, Object> queueArgs = new HashMap<String, Object>();
+        Map<String, Object> exchangeArgs = new HashMap<String, Object>();
+        
         if (deadLetterExchange != null) {
-            queueArgs = new HashMap<String, Object>();
             queueArgs.put(RabbitMQConstants.RABBITMQ_DEAD_LETTER_EXCHANGE, getDeadLetterExchange());
             queueArgs.put(RabbitMQConstants.RABBITMQ_DEAD_LETTER_ROUTING_KEY, getDeadLetterRoutingKey());
-            
+            // TODO Do we need to setup the args for the DeadLetter?
             channel.exchangeDeclare(getDeadLetterExchange(),
                     getDeadLetterExchangeType(),
                     isDurable(),
@@ -215,10 +221,18 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
                     getDeadLetterExchange(),
                     getDeadLetterRoutingKey() == null ? "" : getDeadLetterRoutingKey());
         }
+        
+        if (getQueueArgsConfigurer() != null) {
+            getQueueArgsConfigurer().configurArgs(queueArgs);
+        }
+        if (getExchangeArgsConfigurer() != null) {
+            getExchangeArgsConfigurer().configurArgs(exchangeArgs);
+        }
+        
         channel.exchangeDeclare(getExchangeName(),
                 getExchangeType(),
                 isDurable(),
-                isAutoDelete(), new HashMap<String, Object>());
+                isAutoDelete(), exchangeArgs);
         if (getQueue() != null) {
             // need to make sure the queueDeclare is same with the exchange declare
             channel.queueDeclare(getQueue(), isDurable(), false,
@@ -618,4 +632,36 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
     public void setChannelPoolMaxWait(long channelPoolMaxWait) {
         this.channelPoolMaxWait = channelPoolMaxWait;
     }
+
+    /**
+     * Get the configurer for setting the queue args in Channel.queueDeclare
+     * @return
+     */
+    public ArgsConfigurer getQueueArgsConfigurer() {
+        return queueArgsConfigurer;
+    }
+    
+    /**
+     * Set the configurer for setting the queue args in Channel.queueDeclare
+     * @param queueArgsConfigurer the queue args configurer
+     */
+    public void setQueueArgsConfigurer(ArgsConfigurer queueArgsConfigurer) {
+        this.queueArgsConfigurer = queueArgsConfigurer;
+    }
+    
+    /**
+     * Get the configurer for setting the exchange args in Channel.exchangeDeclare
+     * @return
+     */
+    public ArgsConfigurer getExchangeArgsConfigurer() {
+        return exchangeArgsConfigurer;
+    }
+    
+    /**
+     * Set the configurer for setting the exchange args in Channel.exchangeDeclare
+     * @param queueArgsConfigurer the queue args configurer
+     */
+    public void setExchangeArgsConfigurer(ArgsConfigurer exchangeArgsConfigurer) {
+        this.exchangeArgsConfigurer = exchangeArgsConfigurer;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/0c1f31c5/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
index afae40d..df12e65 100644
--- a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
+++ b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
@@ -30,8 +30,8 @@ import com.rabbitmq.client.Address;
 import com.rabbitmq.client.ConnectionFactory;
 import com.rabbitmq.client.Envelope;
 import com.rabbitmq.client.impl.LongStringHelper;
-
 import org.apache.camel.Exchange;
+import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -40,6 +40,18 @@ public class RabbitMQEndpointTest extends CamelTestSupport {
 
     private Envelope envelope = Mockito.mock(Envelope.class);
     private AMQP.BasicProperties properties = Mockito.mock(AMQP.BasicProperties.class);
+    
+    protected JndiRegistry createRegistry() throws Exception {
+        JndiRegistry registry = super.createRegistry();
+        registry.bind("argsConfigurer", new ArgsConfigurer() {
+            @Override
+            public void configurArgs(Map<String, Object> args) {
+                // do nothing here
+            }
+            
+        });
+        return registry;
+    }
 
     @Test
     public void testCreatingRabbitExchangeSetsStandardHeaders() throws Exception {
@@ -122,6 +134,13 @@ public class RabbitMQEndpointTest extends CamelTestSupport {
 
         assertTrue(endpoint.isSingleton());
     }
+    
+    @Test
+    public void testArgConfigurer() throws Exception {
+        RabbitMQEndpoint endpoint = context.getEndpoint("rabbitmq:localhost/exchange?queueArgsConfigurer=#argsConfigurer", RabbitMQEndpoint.class);
+        assertNotNull("We should get the queueArgsConfigurer here.", endpoint.getQueueArgsConfigurer());
+        assertNull("We should not get the exchangeArgsConfigurer here.", endpoint.getExchangeArgsConfigurer());
+    }
 
     @Test
     public void brokerEndpointAddressesSettings() throws Exception {


[4/6] camel git commit: CAMEL-8505 Setup the message header according to MEP

Posted by ni...@apache.org.
CAMEL-8505 Setup the message header according to MEP


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/61e7fc84
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/61e7fc84
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/61e7fc84

Branch: refs/heads/camel-2.15.x
Commit: 61e7fc84e08f0fc53db4e9051dd5c97e7c2d7e94
Parents: e35d33a
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:29:06 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:36:05 2015 +0800

----------------------------------------------------------------------
 .../apache/camel/component/schematron/SchematronProducer.java | 1 -
 .../camel/component/schematron/SchematronProducerTest.java    | 7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/61e7fc84/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
index e5d000b..9b3f354 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
@@ -72,7 +72,6 @@ public class SchematronProducer extends DefaultProducer {
         Map<String, Object> headers = new HashMap<String, Object>();
         headers.put(Constants.VALIDATION_STATUS, status);
         headers.put(Constants.VALIDATION_REPORT, report);
-        exchange.getOut().setHeader(Constants.VALIDATION_REPORT, report);
         if (exchange.getPattern().isOutCapable()) {
             exchange.getOut().setHeaders(exchange.getIn().getHeaders());
             exchange.getOut().getHeaders().putAll(headers);

http://git-wip-us.apache.org/repos/asf/camel/blob/61e7fc84/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
index 169f7f2..6694503 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
@@ -54,19 +54,20 @@ public class SchematronProducerTest extends CamelTestSupport {
 
         // assert
         assertTrue(exc.getOut().getHeader(Constants.VALIDATION_STATUS).equals(Constants.SUCCESS));
+        assertNotNull("We should get the report here.", exc.getOut().getHeader(Constants.VALIDATION_REPORT));
     }
 
     @Test
     public void testProcessInValidXML() throws Exception {
-        Exchange exc = new DefaultExchange(context, ExchangePattern.InOut);
+        Exchange exc = new DefaultExchange(context, ExchangePattern.InOnly);
         exc.getIn().setBody(ClassLoader.getSystemResourceAsStream("xml/article-2.xml"));
 
         // process xml payload
         producer.process(exc);
 
         // assert
-        assertTrue(exc.getOut().getHeader(Constants.VALIDATION_STATUS).equals(Constants.FAILED));
-
+        assertTrue("The validation status should be failed.", exc.getIn().getHeader(Constants.VALIDATION_STATUS).equals(Constants.FAILED));
+        assertNotNull("We should get the report here.", exc.getIn().getHeader(Constants.VALIDATION_REPORT));
     }
 
 }


[5/6] camel git commit: CAMEL-8504 Fixed the Schematron XSLT templates loading issue on windows

Posted by ni...@apache.org.
CAMEL-8504 Fixed the Schematron XSLT templates loading issue on windows


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a0b05daa
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a0b05daa
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a0b05daa

Branch: refs/heads/camel-2.14.x
Commit: a0b05daa81d356d0da1bf33fdf2eaf59c14bee4a
Parents: 3ab1c20
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:28:24 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:37:02 2015 +0800

----------------------------------------------------------------------
 .../component/schematron/processor/ClassPathURIResolver.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a0b05daa/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
index db506f7..6fa2941 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.schematron.processor;
 
-import java.io.File;
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.URIResolver;
@@ -41,6 +40,6 @@ public class ClassPathURIResolver implements URIResolver {
 
     @Override
     public Source resolve(String href, String base) throws TransformerException {
-        return new StreamSource(ClassLoader.getSystemResourceAsStream(rulesDir.concat(File.separator).concat(href)));
+        return new StreamSource(ClassLoader.getSystemResourceAsStream(rulesDir.concat("/").concat(href)));
     }
 }


[6/6] camel git commit: CAMEL-8505 Setup the message header according to MEP

Posted by ni...@apache.org.
CAMEL-8505 Setup the message header according to MEP


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/238ff59b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/238ff59b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/238ff59b

Branch: refs/heads/camel-2.14.x
Commit: 238ff59bbcbd7f6e42654b3fccd71a65f24672af
Parents: a0b05da
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:29:06 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:37:15 2015 +0800

----------------------------------------------------------------------
 .../apache/camel/component/schematron/SchematronProducer.java | 1 -
 .../camel/component/schematron/SchematronProducerTest.java    | 7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/238ff59b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
index e5d000b..9b3f354 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
@@ -72,7 +72,6 @@ public class SchematronProducer extends DefaultProducer {
         Map<String, Object> headers = new HashMap<String, Object>();
         headers.put(Constants.VALIDATION_STATUS, status);
         headers.put(Constants.VALIDATION_REPORT, report);
-        exchange.getOut().setHeader(Constants.VALIDATION_REPORT, report);
         if (exchange.getPattern().isOutCapable()) {
             exchange.getOut().setHeaders(exchange.getIn().getHeaders());
             exchange.getOut().getHeaders().putAll(headers);

http://git-wip-us.apache.org/repos/asf/camel/blob/238ff59b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
index 169f7f2..6694503 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
@@ -54,19 +54,20 @@ public class SchematronProducerTest extends CamelTestSupport {
 
         // assert
         assertTrue(exc.getOut().getHeader(Constants.VALIDATION_STATUS).equals(Constants.SUCCESS));
+        assertNotNull("We should get the report here.", exc.getOut().getHeader(Constants.VALIDATION_REPORT));
     }
 
     @Test
     public void testProcessInValidXML() throws Exception {
-        Exchange exc = new DefaultExchange(context, ExchangePattern.InOut);
+        Exchange exc = new DefaultExchange(context, ExchangePattern.InOnly);
         exc.getIn().setBody(ClassLoader.getSystemResourceAsStream("xml/article-2.xml"));
 
         // process xml payload
         producer.process(exc);
 
         // assert
-        assertTrue(exc.getOut().getHeader(Constants.VALIDATION_STATUS).equals(Constants.FAILED));
-
+        assertTrue("The validation status should be failed.", exc.getIn().getHeader(Constants.VALIDATION_STATUS).equals(Constants.FAILED));
+        assertNotNull("We should get the report here.", exc.getIn().getHeader(Constants.VALIDATION_REPORT));
     }
 
 }


[2/6] camel git commit: CAMEL-6955: Added validate setting to netty codec

Posted by ni...@apache.org.
CAMEL-6955: Added validate setting to netty codec


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c5567567
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c5567567
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c5567567

Branch: refs/heads/camel-2.15.x
Commit: c556756726b11d493399a2c6ff709930a6b6cf86
Parents: 0c1f31c
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Mar 17 22:29:12 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:35:30 2015 +0800

----------------------------------------------------------------------
 .../component/hl7/HL7MLLPConfigAwareChannelHandlerFactory.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c5567567/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/HL7MLLPConfigAwareChannelHandlerFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/HL7MLLPConfigAwareChannelHandlerFactory.java b/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/HL7MLLPConfigAwareChannelHandlerFactory.java
index 2444c78..82be6d0 100644
--- a/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/HL7MLLPConfigAwareChannelHandlerFactory.java
+++ b/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/HL7MLLPConfigAwareChannelHandlerFactory.java
@@ -34,6 +34,10 @@ abstract class HL7MLLPConfigAwareChannelHandlerFactory extends DefaultChannelHan
     public HL7MLLPConfigAwareChannelHandlerFactory(HL7MLLPConfig config) {
         this.config = config;
     }
+    
+    public void setValidate(boolean validate) {
+        config.setValidate(validate);
+    }
 
     public void setCharset(Charset charset) {
         config.setCharset(charset);


[3/6] camel git commit: CAMEL-8504 Fixed the Schematron XSLT templates loading issue on windows

Posted by ni...@apache.org.
CAMEL-8504 Fixed the Schematron XSLT templates loading issue on windows


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e35d33ac
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e35d33ac
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e35d33ac

Branch: refs/heads/camel-2.15.x
Commit: e35d33aca5973d2f52b743c8a4f9e41146598c9d
Parents: c556756
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:28:24 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:35:56 2015 +0800

----------------------------------------------------------------------
 .../component/schematron/processor/ClassPathURIResolver.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e35d33ac/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
index db506f7..6fa2941 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.schematron.processor;
 
-import java.io.File;
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.URIResolver;
@@ -41,6 +40,6 @@ public class ClassPathURIResolver implements URIResolver {
 
     @Override
     public Source resolve(String href, String base) throws TransformerException {
-        return new StreamSource(ClassLoader.getSystemResourceAsStream(rulesDir.concat(File.separator).concat(href)));
+        return new StreamSource(ClassLoader.getSystemResourceAsStream(rulesDir.concat("/").concat(href)));
     }
 }