You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ra...@apache.org on 2015/09/14 01:59:41 UTC
[1/2] camel git commit: CAMEL-9097 XSLT Aggregation Strategy. Thanks
to Ranil Wijeyratne.
Repository: camel
Updated Branches:
refs/heads/master 9c5395b15 -> 2b7055f7e
CAMEL-9097 XSLT Aggregation Strategy. Thanks to Ranil Wijeyratne.
This closes #598.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cc71df31
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cc71df31
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cc71df31
Branch: refs/heads/master
Commit: cc71df3100fa47e9c757a1213589e06dddd4a856
Parents: 9c5395b
Author: Raul Kripalani <ra...@apache.org>
Authored: Mon Sep 14 00:59:11 2015 +0100
Committer: Raul Kripalani <ra...@apache.org>
Committed: Mon Sep 14 00:59:11 2015 +0100
----------------------------------------------------------------------
camel-core/pom.xml | 7 +
.../camel/component/xslt/XsltEndpoint.java | 3 +-
.../util/toolbox/AggregationStrategies.java | 7 +
.../util/toolbox/XsltAggregationStrategy.java | 235 +++++++++++++++++++
.../toolbox/XsltAggregationStrategyTest.java | 74 ++++++
.../util/toolbox/aggregate-user-property.xsl | 32 +++
.../org/apache/camel/util/toolbox/aggregate.xsl | 32 +++
.../org/apache/camel/util/toolbox/data1.xml | 18 ++
.../org/apache/camel/util/toolbox/data2.xml | 18 ++
.../org/apache/camel/util/toolbox/data3.xml | 18 ++
10 files changed, 443 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/pom.xml
----------------------------------------------------------------------
diff --git a/camel-core/pom.xml b/camel-core/pom.xml
index 0152138..5817dee 100644
--- a/camel-core/pom.xml
+++ b/camel-core/pom.xml
@@ -169,6 +169,13 @@
<scope>test</scope>
</dependency>
+ <!-- for xslt tests -->
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>Saxon-HE</artifactId>
+ <scope>test</scope>
+ </dependency>
+
<!-- validator -->
<dependency>
<groupId>xml-resolver</groupId>
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
index 6a4ecd0..51d0790 100644
--- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
@@ -47,8 +47,9 @@ import org.slf4j.LoggerFactory;
@UriEndpoint(scheme = "xslt", title = "XSLT", syntax = "xslt:resourceUri", producerOnly = true, label = "core,transformation")
public class XsltEndpoint extends ProcessorEndpoint {
+ public static final String SAXON_TRANSFORMER_FACTORY_CLASS_NAME = "net.sf.saxon.TransformerFactoryImpl";
+
private static final Logger LOG = LoggerFactory.getLogger(XsltEndpoint.class);
- private static final String SAXON_TRANSFORMER_FACTORY_CLASS_NAME = "net.sf.saxon.TransformerFactoryImpl";
private volatile boolean cacheCleared;
private volatile XsltBuilder xslt;
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java b/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
index 9877758..0dbfbb4 100644
--- a/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
+++ b/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
@@ -123,4 +123,11 @@ public final class AggregationStrategies {
return adapter;
}
+ /**
+ * Creates a {@link XsltAggregationStrategy} as the aggregation strategy.
+ */
+ public static XsltAggregationStrategy xslt(String xslFileLocation) {
+ return XsltAggregationStrategy.create(xslFileLocation);
+ }
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/main/java/org/apache/camel/util/toolbox/XsltAggregationStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/toolbox/XsltAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/util/toolbox/XsltAggregationStrategy.java
new file mode 100644
index 0000000..fbadfae
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/util/toolbox/XsltAggregationStrategy.java
@@ -0,0 +1,235 @@
+/**
+ * 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.util.toolbox;
+
+import java.io.IOException;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
+
+import org.w3c.dom.Document;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.xml.XsltBuilder;
+import org.apache.camel.builder.xml.XsltUriResolver;
+import org.apache.camel.component.xslt.XsltEndpoint;
+import org.apache.camel.component.xslt.XsltOutput;
+import org.apache.camel.processor.aggregate.AggregationStrategy;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The XSLT Aggregation Strategy enables you to use XSL stylesheets to aggregate messages.
+ * <p>
+ * Since XSLT does not directly support providing multiple XML payloads as an input, this aggregator injects
+ * the new incoming XML document (<tt>newExchange</tt>) into the <tt>oldExchange</tt> as an exchange property of
+ * type {@link Document}. The old exchange therefore remains accessible as the root context.
+ * This exchange property can then be accessed from your XSLT by declaring an {@code <xsl:param />} at the top
+ * of your stylesheet:
+ *
+ * <code>
+ * <xsl:param name="new-exchange" />
+ *
+ * <xsl:template match="/">
+ * <abc>
+ * <xsl:copy-of select="/ElementFromOldExchange" />
+ * <xsl:copy-of select="$new-exchange/ElementFromNewExchange" />
+ * </abc>
+ * </xsl:template>
+ * </code>
+ *
+ * The exchange property name defaults to <tt>new-exchange</tt> but can be
+ * changed through {@link #setPropertyName(String)}.
+ * <p>
+ * Some code bits have been copied from the {@link org.apache.camel.component.xslt.XsltEndpoint}.
+ *
+ */
+public class XsltAggregationStrategy implements AggregationStrategy {
+
+ private static final Logger LOG = LoggerFactory.getLogger(XsltAggregationStrategy.class);
+ private static final String DEFAULT_PROPERTY_NAME = "new-exchange";
+
+ private volatile XsltBuilder xslt;
+ private volatile URIResolver uriResolver;
+
+ private String propertyName;
+ private String xslFile;
+ private String transformerFactoryClass;
+ private XsltOutput output = XsltOutput.string;
+
+ /**
+ * Constructor.
+ *
+ * @param xslFileLocation location of the XSL transformation
+ */
+ public XsltAggregationStrategy(String xslFileLocation) {
+ this.xslFile = xslFileLocation;
+ }
+
+ @Override
+ public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
+ // guard against unlikely NPE
+ if (newExchange == null) {
+ return oldExchange;
+ }
+
+ // in the first call to this aggregation, do not call the XSLT but instead store the
+ // incoming exchange
+ if (oldExchange == null) {
+ return newExchange;
+ }
+
+ try {
+ // initialize if this is the first call
+ if (xslt == null) {
+ initialize(oldExchange.getContext());
+ }
+
+ oldExchange.setProperty(propertyName, newExchange.getIn().getBody(Document.class));
+ xslt.process(oldExchange);
+
+ return oldExchange;
+
+ } catch (Throwable e) {
+ oldExchange.setException(e);
+ }
+
+ return oldExchange;
+ }
+
+ public void setOutput(XsltOutput output) {
+ this.output = output;
+ }
+
+ public void setXslt(XsltBuilder xslt) {
+ this.xslt = xslt;
+ }
+
+ public void setUriResolver(URIResolver uriResolver) {
+ this.uriResolver = uriResolver;
+ }
+
+ public void setTransformerFactoryClass(String transformerFactoryClass) {
+ this.transformerFactoryClass = transformerFactoryClass;
+ }
+
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ protected void initialize(CamelContext context) throws Exception {
+ // set the default property name if not set
+ this.propertyName = ObjectHelper.isNotEmpty(propertyName) ? propertyName : DEFAULT_PROPERTY_NAME;
+
+ // initialize the XsltBuilder
+ this.xslt = context.getInjector().newInstance(XsltBuilder.class);
+
+ if (transformerFactoryClass != null) {
+ Class<?> factoryClass = context.getClassResolver().resolveMandatoryClass(transformerFactoryClass,
+ XsltAggregationStrategy.class.getClassLoader());
+ TransformerFactory factory = (TransformerFactory) context.getInjector().newInstance(factoryClass);
+ xslt.getConverter().setTransformerFactory(factory);
+ }
+
+ if (uriResolver == null) {
+ uriResolver = new XsltUriResolver(context.getClassResolver(), xslFile);
+ }
+
+ xslt.setUriResolver(uriResolver);
+ xslt.setFailOnNullBody(true);
+ xslt.transformerCacheSize(0);
+ xslt.setAllowStAX(true);
+ xslt.setCamelContext(context);
+
+ configureOutput(xslt, output.name());
+ loadResource(xslFile);
+ }
+
+ protected void configureOutput(XsltBuilder xslt, String output) throws Exception {
+ if (ObjectHelper.isEmpty(output)) {
+ return;
+ }
+
+ if ("string".equalsIgnoreCase(output)) {
+ xslt.outputString();
+ } else if ("bytes".equalsIgnoreCase(output)) {
+ xslt.outputBytes();
+ } else if ("DOM".equalsIgnoreCase(output)) {
+ xslt.outputDOM();
+ } else if ("file".equalsIgnoreCase(output)) {
+ xslt.outputFile();
+ } else {
+ throw new IllegalArgumentException("Unknown output type: " + output);
+ }
+ }
+
+ /**
+ * Loads the resource.
+ *
+ * @param resourceUri the resource to load
+ * @throws TransformerException is thrown if error loading resource
+ * @throws IOException is thrown if error loading resource
+ */
+ protected void loadResource(String resourceUri) throws TransformerException, IOException {
+ LOG.trace("{} loading schema resource: {}", this, resourceUri);
+ Source source = xslt.getUriResolver().resolve(resourceUri, null);
+ if (source == null) {
+ throw new IOException("Cannot load schema resource " + resourceUri);
+ } else {
+ xslt.setTransformerSource(source);
+ }
+ }
+
+ // --- fluent builders ---
+ public static XsltAggregationStrategy create(String xslFile) {
+ return new XsltAggregationStrategy(xslFile);
+ }
+
+ public XsltAggregationStrategy withPropertyName(String propertyName) {
+ setPropertyName(propertyName);
+ return this;
+ }
+
+ public XsltAggregationStrategy withOutput(XsltOutput output) {
+ setOutput(output);
+ return this;
+ }
+
+ public XsltAggregationStrategy withUriResolver(URIResolver resolver) {
+ setUriResolver(resolver);
+ return this;
+ }
+
+ public XsltAggregationStrategy withTransformerFactoryClass(String clazz) {
+ setTransformerFactoryClass(clazz);
+ return this;
+ }
+
+ public XsltAggregationStrategy withSaxon() {
+ setTransformerFactoryClass(XsltEndpoint.SAXON_TRANSFORMER_FACTORY_CLASS_NAME);
+ return this;
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java b/camel-core/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
new file mode 100644
index 0000000..da5bf67
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
@@ -0,0 +1,74 @@
+/**
+ * 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.util.toolbox;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+/**
+ * Unit test for the {@link XsltAggregationStrategy}.
+ * <p>
+ * Need to use Saxon to get a predictable result: we cannot rely on the JDK's XSLT processor as it can vary across
+ * platforms and JDK versions. Also, Xalan does not handle node-set properties well.
+ */
+public class XsltAggregationStrategyTest extends ContextTestSupport {
+
+ @Test
+ public void testXsltAggregationDefaultProperty() throws Exception {
+ context.startRoute("route1");
+ MockEndpoint mock = getMockEndpoint("mock:transformed");
+ mock.expectedMessageCount(1);
+ mock.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"UTF-8\"?><item>ABC</item>");
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testXsltAggregationUserProperty() throws Exception {
+ context.startRoute("route2");
+ MockEndpoint mock = getMockEndpoint("mock:transformed");
+ mock.expectedMessageCount(1);
+ mock.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"UTF-8\"?><item>ABC</item>");
+ assertMockEndpointsSatisfied();
+ }
+
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("file:src/test/resources/org/apache/camel/util/toolbox?noop=true&antInclude=*.xml")
+ .routeId("route1").noAutoStartup()
+ .aggregate(new XsltAggregationStrategy("org/apache/camel/util/toolbox/aggregate.xsl")
+ .withSaxon())
+ .constant(true)
+ .completionFromBatchConsumer()
+ .log("after aggregate body: ${body}")
+ .to("mock:transformed");
+
+ from("file:src/test/resources/org/apache/camel/util/toolbox?noop=true&antInclude=*.xml")
+ .routeId("route2").noAutoStartup()
+ .aggregate(new XsltAggregationStrategy("org/apache/camel/util/toolbox/aggregate-user-property.xsl")
+ .withSaxon().withPropertyName("user-property"))
+ .constant(true)
+ .completionFromBatchConsumer()
+ .log("after aggregate body: ${body}")
+ .to("mock:transformed");
+ }
+ };
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate-user-property.xsl
----------------------------------------------------------------------
diff --git a/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate-user-property.xsl b/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate-user-property.xsl
new file mode 100644
index 0000000..74bdd85
--- /dev/null
+++ b/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate-user-property.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output method="xml" indent="no"/>
+ <xsl:strip-space elements="*"/>
+
+ <xsl:param name="user-property" />
+
+ <xsl:template match="/">
+ <item>
+ <xsl:value-of select="."/>
+ <xsl:value-of select="$user-property/item"/>
+ </item>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate.xsl
----------------------------------------------------------------------
diff --git a/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate.xsl b/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate.xsl
new file mode 100644
index 0000000..8d20385
--- /dev/null
+++ b/camel-core/src/test/resources/org/apache/camel/util/toolbox/aggregate.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output method="xml" indent="no"/>
+ <xsl:strip-space elements="*"/>
+
+ <xsl:param name="new-exchange" />
+
+ <xsl:template match="/">
+ <item>
+ <xsl:value-of select="."/>
+ <xsl:value-of select="$new-exchange/item"/>
+ </item>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/test/resources/org/apache/camel/util/toolbox/data1.xml
----------------------------------------------------------------------
diff --git a/camel-core/src/test/resources/org/apache/camel/util/toolbox/data1.xml b/camel-core/src/test/resources/org/apache/camel/util/toolbox/data1.xml
new file mode 100644
index 0000000..be8cd6d
--- /dev/null
+++ b/camel-core/src/test/resources/org/apache/camel/util/toolbox/data1.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<item>A</item>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/test/resources/org/apache/camel/util/toolbox/data2.xml
----------------------------------------------------------------------
diff --git a/camel-core/src/test/resources/org/apache/camel/util/toolbox/data2.xml b/camel-core/src/test/resources/org/apache/camel/util/toolbox/data2.xml
new file mode 100644
index 0000000..3d3d463
--- /dev/null
+++ b/camel-core/src/test/resources/org/apache/camel/util/toolbox/data2.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<item>B</item>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cc71df31/camel-core/src/test/resources/org/apache/camel/util/toolbox/data3.xml
----------------------------------------------------------------------
diff --git a/camel-core/src/test/resources/org/apache/camel/util/toolbox/data3.xml b/camel-core/src/test/resources/org/apache/camel/util/toolbox/data3.xml
new file mode 100644
index 0000000..9182bcb
--- /dev/null
+++ b/camel-core/src/test/resources/org/apache/camel/util/toolbox/data3.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<item>C</item>
\ No newline at end of file
[2/2] camel git commit: Fix checkstyle.
Posted by ra...@apache.org.
Fix checkstyle.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2b7055f7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2b7055f7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2b7055f7
Branch: refs/heads/master
Commit: 2b7055f7e8811a7b64175df8eb44f7965110875e
Parents: cc71df3
Author: Raul Kripalani <ra...@apache.org>
Authored: Mon Sep 14 00:59:18 2015 +0100
Committer: Raul Kripalani <ra...@apache.org>
Committed: Mon Sep 14 00:59:18 2015 +0100
----------------------------------------------------------------------
.../org/apache/camel/component/rest/FromRestOptionsTest.java | 6 ------
1 file changed, 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2b7055f7/camel-core/src/test/java/org/apache/camel/component/rest/FromRestOptionsTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestOptionsTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestOptionsTest.java
index 07e03a8..7485cb1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestOptionsTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestOptionsTest.java
@@ -21,14 +21,8 @@ import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.model.ToDefinition;
import org.apache.camel.model.rest.OptionsVerbDefinition;
import org.apache.camel.model.rest.RestDefinition;
-import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.spi.RestConfiguration;
-
-import java.util.Arrays;
-import java.util.List;
public class FromRestOptionsTest extends ContextTestSupport {