You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/05/07 13:38:24 UTC
[camel] branch master updated (8f916e4 -> b3c74bf)
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 8f916e4 Regen
new baef4fa Checkstyle fixes
new b3c74bf Use same maven-checkstyle-plugin version
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/camel/component/jolt/JoltConstants.java | 2 +-
.../apache/camel/component/jolt/JoltEndpoint.java | 35 +++++++++++++---------
.../camel/component/jolt/JoltDefaultrTest.java | 8 ++---
.../camel/component/jolt/JoltFirstSampleTest.java | 14 ++++-----
.../camel/component/jolt/JoltRemovrTest.java | 6 ++--
.../NettyHttpOperationFailedExceptionTest.java | 4 +--
.../RestNettyProducerThrowExceptionErrorTest.java | 2 +-
.../src/test/resources/logback.xml | 34 +++++++++++----------
platforms/spring-boot/spring-boot-dm/pom.xml | 12 +++++---
9 files changed, 65 insertions(+), 52 deletions(-)
--
To stop receiving notification emails like this one, please contact
zregvart@apache.org.
[camel] 01/02: Checkstyle fixes
Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit baef4fa9a4888201f3743321b2b4e082ee4712fe
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon May 7 15:35:20 2018 +0200
Checkstyle fixes
---
.../apache/camel/component/jolt/JoltConstants.java | 2 +-
.../apache/camel/component/jolt/JoltEndpoint.java | 35 +++++++++++++---------
.../camel/component/jolt/JoltDefaultrTest.java | 8 ++---
.../camel/component/jolt/JoltFirstSampleTest.java | 14 ++++-----
.../camel/component/jolt/JoltRemovrTest.java | 6 ++--
.../NettyHttpOperationFailedExceptionTest.java | 4 +--
.../RestNettyProducerThrowExceptionErrorTest.java | 2 +-
.../src/test/resources/logback.xml | 34 +++++++++++----------
8 files changed, 57 insertions(+), 48 deletions(-)
diff --git a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
index 0493817..1f115ee 100644
--- a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
+++ b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
@@ -22,7 +22,7 @@ package org.apache.camel.component.jolt;
public final class JoltConstants {
public static final String JOLT_RESOURCE_URI = "CamelJoltResourceUri";
-
+
public static final String JOLT_CONTEXT = "CamelJoltContext";
private JoltConstants() {
diff --git a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
index fc51d36..018890c 100644
--- a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
+++ b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
@@ -19,7 +19,15 @@ package org.apache.camel.component.jolt;
import java.io.InputStream;
import java.util.Map;
-import com.bazaarvoice.jolt.*;
+import com.bazaarvoice.jolt.Chainr;
+import com.bazaarvoice.jolt.ContextualTransform;
+import com.bazaarvoice.jolt.Defaultr;
+import com.bazaarvoice.jolt.JoltTransform;
+import com.bazaarvoice.jolt.JsonUtils;
+import com.bazaarvoice.jolt.Removr;
+import com.bazaarvoice.jolt.Shiftr;
+import com.bazaarvoice.jolt.Sortr;
+import com.bazaarvoice.jolt.Transform;
import org.apache.camel.Exchange;
import org.apache.camel.ExchangePattern;
@@ -27,7 +35,6 @@ import org.apache.camel.Message;
import org.apache.camel.component.ResourceEndpoint;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
-import org.apache.camel.util.ExchangeHelper;
import org.apache.camel.util.ObjectHelper;
/**
@@ -35,18 +42,18 @@ import org.apache.camel.util.ObjectHelper;
*/
@UriEndpoint(firstVersion = "2.16.0", scheme = "jolt", title = "JOLT", syntax = "jolt:resourceUri", producerOnly = true, label = "transformation")
public class JoltEndpoint extends ResourceEndpoint {
-
+
private JoltTransform transform;
@UriParam(defaultValue = "Hydrated")
private JoltInputOutputType outputType;
-
+
@UriParam(defaultValue = "Hydrated")
private JoltInputOutputType inputType;
-
+
@UriParam(defaultValue = "Chainr")
private JoltTransformType transformDsl = JoltTransformType.Chainr;
-
+
public JoltEndpoint() {
}
@@ -98,7 +105,7 @@ public class JoltEndpoint extends ResourceEndpoint {
break;
}
}
-
+
}
return transform;
}
@@ -109,40 +116,40 @@ public class JoltEndpoint extends ResourceEndpoint {
public void setTransform(JoltTransform transform) {
this.transform = transform;
}
-
+
public JoltInputOutputType getOutputType() {
return outputType;
}
-
+
/**
* Specifies if the output should be hydrated JSON or a JSON String.
*/
public void setOutputType(JoltInputOutputType outputType) {
this.outputType = outputType;
}
-
+
public JoltInputOutputType getInputType() {
return inputType;
}
-
+
/**
* Specifies if the input is hydrated JSON or a JSON String.
*/
public void setInputType(JoltInputOutputType inputType) {
this.inputType = inputType;
}
-
+
public JoltTransformType getTransformDsl() {
return transformDsl;
}
-
+
/**
* Specifies the Transform DSL of the endpoint resource. If none is specified <code>Chainr</code> will be used.
*/
public void setTransformDsl(JoltTransformType transformType) {
this.transformDsl = transformType;
}
-
+
public JoltEndpoint findOrCreateEndpoint(String uri, String newResourceUri) {
String newUri = uri.replace(getResourceUri(), newResourceUri);
log.debug("Getting endpoint with URI: {}", newUri);
diff --git a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltDefaultrTest.java b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltDefaultrTest.java
index 2c235b0..4816a8b 100644
--- a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltDefaultrTest.java
+++ b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltDefaultrTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
* Unit test testing the Removr.
*/
public class JoltDefaultrTest extends CamelTestSupport {
-
+
@Test
public void testFirstSampleJolt() throws Exception {
Exchange exchange = template.request("direct://start", new Processor() {
@@ -40,14 +40,14 @@ public class JoltDefaultrTest extends CamelTestSupport {
exchange.getIn().setBody(body);
}
});
-
+
assertEquals(3, exchange.getOut().getBody(Map.class).size());
assertEquals("aa", exchange.getOut().getBody(Map.class).get("a"));
assertEquals("bb", exchange.getOut().getBody(Map.class).get("b"));
assertEquals("World", exchange.getOut().getBody(Map.class).get("Hello"));
-
+
}
-
+
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
diff --git a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
index 63bef43..4bcc95f 100644
--- a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
+++ b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
@@ -16,6 +16,9 @@
*/
package org.apache.camel.component.jolt;
+import java.util.HashMap;
+import java.util.Map;
+
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
@@ -24,9 +27,6 @@ import org.apache.camel.util.IOHelper;
import org.apache.camel.util.ResourceHelper;
import org.junit.Test;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* Unit test based on the first sample test from the JOLT project.
*/
@@ -34,18 +34,18 @@ public class JoltFirstSampleTest extends CamelTestSupport {
@Test
public void testFirstSampleJolt() throws Exception {
- getMockEndpoint("mock:result").expectedMinimumMessageCount(1);
+ getMockEndpoint("mock:result").expectedMinimumMessageCount(1);
getMockEndpoint("mock:result").expectedBodiesReceived(
IOHelper.loadText(
ResourceHelper.resolveMandatoryResourceAsInputStream(
context, "org/apache/camel/component/jolt/firstSample/output.json")
).trim() // Remove the last newline added by IOHelper.loadText()
);
-
- sendBody("direct://start",
+
+ sendBody("direct://start",
ResourceHelper.resolveMandatoryResourceAsInputStream(
context, "org/apache/camel/component/jolt/firstSample/input.json"));
-
+
assertMockEndpointsSatisfied();
}
diff --git a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
index 77c0788..bf78624 100644
--- a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
+++ b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltRemovrTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
* Unit test testing the Removr.
*/
public class JoltRemovrTest extends CamelTestSupport {
-
+
@Test
public void testFirstSampleJolt() throws Exception {
Exchange exchange = template.request("direct://start", new Processor() {
@@ -42,12 +42,12 @@ public class JoltRemovrTest extends CamelTestSupport {
exchange.getIn().setBody(body);
}
});
-
+
assertEquals(2, exchange.getOut().getBody(Map.class).size());
assertEquals(null, exchange.getOut().getBody(Map.class).get("removeMe"));
assertEquals("World", exchange.getOut().getBody(Map.class).get("Hello"));
}
-
+
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedExceptionTest.java b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedExceptionTest.java
index db83dfb..c032318 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedExceptionTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedExceptionTest.java
@@ -16,10 +16,10 @@
*/
package org.apache.camel.component.netty4.http;
-import org.junit.Test;
-
import io.netty.handler.codec.http.DefaultLastHttpContent;
+import org.junit.Test;
+
import static org.hamcrest.core.IsNot.not;
import static org.hamcrest.core.StringContains.containsString;
import static org.junit.Assert.assertThat;
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/rest/RestNettyProducerThrowExceptionErrorTest.java b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/rest/RestNettyProducerThrowExceptionErrorTest.java
index d91d799..03bfb8e 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/rest/RestNettyProducerThrowExceptionErrorTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/rest/RestNettyProducerThrowExceptionErrorTest.java
@@ -22,7 +22,7 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.netty4.http.BaseNettyTest;
import org.junit.Test;
-public class RestNettyProducerThrowExceptionErrorTest extends BaseNettyTest{
+public class RestNettyProducerThrowExceptionErrorTest extends BaseNettyTest {
@Test
public void testUndertowProducerOk() throws Exception {
diff --git a/platforms/spring-boot/components-starter/camel-reactive-streams-starter/src/test/resources/logback.xml b/platforms/spring-boot/components-starter/camel-reactive-streams-starter/src/test/resources/logback.xml
index 62dedab..b78d115 100644
--- a/platforms/spring-boot/components-starter/camel-reactive-streams-starter/src/test/resources/logback.xml
+++ b/platforms/spring-boot/components-starter/camel-reactive-streams-starter/src/test/resources/logback.xml
@@ -1,20 +1,22 @@
<?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.
- -->
+
+ 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.
+
+-->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
@@ -36,4 +38,4 @@
<appender-ref ref="FILE"/>
</root>
-</configuration>
\ No newline at end of file
+</configuration>
--
To stop receiving notification emails like this one, please contact
zregvart@apache.org.
[camel] 02/02: Use same maven-checkstyle-plugin version
Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit b3c74bfe3a79e5bc4bb793fcb6b7e4053ccc4f82
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon May 7 15:37:55 2018 +0200
Use same maven-checkstyle-plugin version
Seems that the version used in `camel-spring-boot-dm` differs from the
version we use in `camel-parent` this sets the version to 3.0.0 and
aligns the configuration.
---
platforms/spring-boot/spring-boot-dm/pom.xml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/platforms/spring-boot/spring-boot-dm/pom.xml b/platforms/spring-boot/spring-boot-dm/pom.xml
index 99a7e1e..df4feb1 100644
--- a/platforms/spring-boot/spring-boot-dm/pom.xml
+++ b/platforms/spring-boot/spring-boot-dm/pom.xml
@@ -58,7 +58,7 @@
<groovy-version>2.4.15</groovy-version>
<!-- Plugin versions -->
- <maven-checkstyle-plugin-version>2.17</maven-checkstyle-plugin-version>
+ <maven-checkstyle-plugin-version>3.0.0</maven-checkstyle-plugin-version>
<maven-checkstyle-version>7.6.1</maven-checkstyle-version>
</properties>
@@ -90,12 +90,16 @@
<includeResources>false</includeResources>
<configLocation>camel-checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
- <failsOnError>true</failsOnError>
+ <failsOnError>${checkstyle.failOnViolation}</failsOnError>
<linkXRef>false</linkXRef>
<suppressionsLocation>camel-checkstyle-suppressions.xml</suppressionsLocation>
<encoding>UTF-8</encoding>
- <sourceDirectory>${basedir}/src</sourceDirectory>
- <excludes>**/archetype-resources/**/*.java</excludes>
+ <sourceDirectories>
+ <sourceDirectory>${basedir}/src</sourceDirectory>
+ </sourceDirectories>
+ <headerLocation>header-java.txt</headerLocation>
+ <includes>**/*.java,**/*.groovy,**/*.scala,**/*.properties,**/*.xml,**/*.xsd</includes>
+ <excludes>**/archetype-resources/**/*.java,**/archetype-resources/**/*.groovy,**/archetype-resources/**/*.scala,**/archetype-resources/**/*.xml,**/org/json/simple/**/*.java</excludes>
</configuration>
<goals>
<goal>checkstyle</goal>
--
To stop receiving notification emails like this one, please contact
zregvart@apache.org.