You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/10/24 23:46:08 UTC

[camel-quarkus] branch master updated (b37698c -> edec698)

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.


    from b37698c  Do not use docker to run native tests, fixes #332
     new cfa4419  chore(build): add a profile to activate native build in containers, default is to build with local native-image
     new d0962de  fhir: build time config options
     new 80d3420  chore: fix unchecked cast warning
     new 0c48f79  chore: fix dependencies issues reported during augmentation phase
     new cbba439  chore: fix cs
     new 35529af  fhir: build time config options (improved)
     new edec698  fhir: update doc doc

The 7 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:
 Jenkinsfile                                        |  2 +-
 Jenkinsfile.quarkus                                |  2 +-
 docs/modules/ROOT/pages/extensions/fhir.adoc       |  6 ++---
 docs/modules/ROOT/pages/user-guide.adoc            |  4 +--
 examples/observability/pom.xml                     |  5 ----
 examples/rest-json/pom.xml                         | 11 --------
 examples/timer-log-xml/pom.xml                     |  7 -----
 .../src/main/resources/routes/my-routes.xml        |  4 +++
 examples/timer-log/pom.xml                         |  7 -----
 .../deployment/AttachmentsProcessor.java           |  7 +++--
 .../component/attachments/AttachmentsRecorder.java |  6 ++---
 .../quarkus/core/deployment/BuildProcessor.java    |  2 +-
 .../core/deployment/UploadAttacherBuildItem.java   |  4 +--
 .../component/fhir/deployment/FhirProcessor.java   | 30 +++++++++++-----------
 .../camel/quarkus/component/fhir/FhirConfig.java}  | 26 +++++++++++--------
 .../camel/quarkus/component/fhir/FhirFlags.java    |  6 ++---
 .../deployment/MicroProfileHealthProcessor.java    |  4 +--
 .../runtime/CamelMicroProfileMetricsRecorder.java  |  2 +-
 .../platform/http/PlatformHttpEndpoint.java        |  2 +-
 .../http/runtime/QuarkusPlatformHttpConsumer.java  | 25 +++++++++---------
 .../test/src/test/resources/my-routes.xml          |  4 +++
 integration-tests/fhir/pom.xml                     |  8 +++---
 .../component/fhir/it/FhirDstu2Resource.java       |  5 ++--
 .../component/fhir/it/FhirDstu2RouteBuilder.java   |  5 ++--
 .../component/fhir/it/FhirDstu3Resource.java       |  5 ++--
 .../component/fhir/it/FhirDstu3RouteBuilder.java   |  4 +--
 .../quarkus/component/fhir/it/FhirR4Resource.java  |  5 ++--
 .../component/fhir/it/FhirR4RouteBuilder.java      |  5 ++--
 .../fhir/src/main/resources/application.properties | 12 ++++-----
 .../camel/quarkus/component/fhir/it/FhirTest.java  | 27 ++++++++++++-------
 .../http/server/it/PlatformHttpEngineTest.java     |  3 +--
 .../platform/http/it/PlatformHttpRouteBuilder.java |  2 ++
 .../component/http/server/it/PlatformHttpTest.java |  9 +++----
 integration-tests/pom.xml                          |  1 -
 integration-tests/salesforce/pom.xml               |  2 +-
 pom.xml                                            | 13 ++++++++++
 36 files changed, 136 insertions(+), 136 deletions(-)
 copy extensions/{opentracing/runtime/src/main/java/org/apache/camel/quarkus/component/opentracing/CamelOpenTracingConfig.java => fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java} (64%)


[camel-quarkus] 02/07: fhir: build time config options

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit d0962de71e96f71456b23b8e12246107d964a225
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Thu Oct 24 19:35:50 2019 +0200

    fhir: build time config options
---
 .../component/fhir/deployment/FhirProcessor.java   | 30 +++++++--------
 .../camel/quarkus/component/fhir/FhirConfig.java   | 43 ++++++++++++++++++++++
 .../camel/quarkus/component/fhir/FhirFlags.java    |  6 +--
 integration-tests/fhir/pom.xml                     |  4 +-
 .../fhir/src/main/resources/application.properties | 12 +++---
 5 files changed, 68 insertions(+), 27 deletions(-)

diff --git a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
index b2c52bf..583e15e 100644
--- a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
+++ b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java
@@ -21,6 +21,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
+
 import ca.uhn.fhir.model.dstu2.FhirDstu2;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
@@ -48,7 +49,6 @@ import org.hl7.fhir.dstu3.hapi.ctx.FhirDstu3;
 import org.hl7.fhir.dstu3.model.Enumerations;
 
 class FhirProcessor {
-
     private static final String FEATURE = "camel-fhir";
 
     @BuildStep
@@ -65,20 +65,20 @@ class FhirProcessor {
     @BuildStep()
     ReflectiveClassBuildItem fhirEndpointConfiguration() {
         return new ReflectiveClassBuildItem(true, true,
-                FhirCreateEndpointConfiguration.class.getCanonicalName(),
-                FhirCapabilitiesEndpointConfiguration.class.getCanonicalName(),
-                FhirDeleteEndpointConfiguration.class.getCanonicalName(),
-                FhirHistoryEndpointConfiguration.class.getCanonicalName(),
-                FhirLoadPageEndpointConfiguration.class.getCanonicalName(),
-                FhirMetaEndpointConfiguration.class.getCanonicalName(),
-                FhirOperationEndpointConfiguration.class.getCanonicalName(),
-                FhirPatchEndpointConfiguration.class.getCanonicalName(),
-                FhirReadEndpointConfiguration.class.getCanonicalName(),
-                FhirSearchEndpointConfiguration.class.getCanonicalName(),
-                FhirTransactionEndpointConfiguration.class.getCanonicalName(),
-                FhirUpdateEndpointConfiguration.class.getCanonicalName(),
-                FhirValidateEndpointConfiguration.class.getCanonicalName(),
-                FhirConfiguration.class.getCanonicalName());
+                FhirCreateEndpointConfiguration.class,
+                FhirCapabilitiesEndpointConfiguration.class,
+                FhirDeleteEndpointConfiguration.class,
+                FhirHistoryEndpointConfiguration.class,
+                FhirLoadPageEndpointConfiguration.class,
+                FhirMetaEndpointConfiguration.class,
+                FhirOperationEndpointConfiguration.class,
+                FhirPatchEndpointConfiguration.class,
+                FhirReadEndpointConfiguration.class,
+                FhirSearchEndpointConfiguration.class,
+                FhirTransactionEndpointConfiguration.class,
+                FhirUpdateEndpointConfiguration.class,
+                FhirValidateEndpointConfiguration.class,
+                FhirConfiguration.class);
     }
 
     @BuildStep()
diff --git a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
new file mode 100644
index 0000000..a2b05f0
--- /dev/null
+++ b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
@@ -0,0 +1,43 @@
+/*
+ * 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.quarkus.component.fhir;
+
+import io.quarkus.runtime.annotations.ConfigItem;
+import io.quarkus.runtime.annotations.ConfigPhase;
+import io.quarkus.runtime.annotations.ConfigRoot;
+
+@ConfigRoot(name = "camel.fhir", phase = ConfigPhase.BUILD_TIME)
+public final class FhirConfig {
+
+    /**
+     * Enable FHIR DSTU2 Specs.
+     */
+    @ConfigItem(defaultValue = "true")
+    public boolean enableDstu2;
+
+    /**
+     * Enable FHIR DSTU3 Specs.
+     */
+    @ConfigItem(defaultValue = "false")
+    public boolean enableDstu3;
+
+    /**
+     * Enable FHIR R4 Specs.
+     */
+    @ConfigItem(defaultValue = "true")
+    public boolean enableR4;
+}
diff --git a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java
index 0a3af8e..07053fa 100644
--- a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java
+++ b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java
@@ -26,21 +26,21 @@ public final class FhirFlags {
     public static final class Dstu2Enabled implements BooleanSupplier {
         @Override
         public boolean getAsBoolean() {
-            return ConfigProvider.getConfig().getOptionalValue("camel.fhir.enable-dstu2", Boolean.class).orElse(Boolean.TRUE);
+            return ConfigProvider.getConfig().getOptionalValue("quarkus.camel.fhir.enable-dstu2", Boolean.class).orElse(Boolean.TRUE);
         }
     }
 
     public static final class Dstu3Enabled implements BooleanSupplier {
         @Override
         public boolean getAsBoolean() {
-            return ConfigProvider.getConfig().getOptionalValue("camel.fhir.enable-dstu3", Boolean.class).orElse(Boolean.TRUE);
+            return ConfigProvider.getConfig().getOptionalValue("quarkus.camel.fhir.enable-dstu3", Boolean.class).orElse(Boolean.TRUE);
         }
     }
 
     public static final class R4Enabled implements BooleanSupplier {
         @Override
         public boolean getAsBoolean() {
-            return ConfigProvider.getConfig().getOptionalValue("camel.fhir.enable-r4", Boolean.class).orElse(Boolean.TRUE);
+            return ConfigProvider.getConfig().getOptionalValue("quarkus.camel.fhir.enable-r4", Boolean.class).orElse(Boolean.TRUE);
         }
     }
 }
\ No newline at end of file
diff --git a/integration-tests/fhir/pom.xml b/integration-tests/fhir/pom.xml
index 51ee3d8..41938c1 100644
--- a/integration-tests/fhir/pom.xml
+++ b/integration-tests/fhir/pom.xml
@@ -79,8 +79,8 @@
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <systemProperties combine.children="append">
-                        <camel.fhir.enable-dstu2>true</camel.fhir.enable-dstu2>
-                        <camel.fhir.enable-r4>true</camel.fhir.enable-r4>
+                        <quarkus.camel.fhir.enable-dstu2>true</quarkus.camel.fhir.enable-dstu2>
+                        <quarkus.camel.fhir.enable-r4>true</quarkus.camel.fhir.enable-r4>
                     </systemProperties>
                 </configuration>
             </plugin>
diff --git a/integration-tests/fhir/src/main/resources/application.properties b/integration-tests/fhir/src/main/resources/application.properties
index 06640a2..863922c 100644
--- a/integration-tests/fhir/src/main/resources/application.properties
+++ b/integration-tests/fhir/src/main/resources/application.properties
@@ -18,19 +18,17 @@
 # Quarkus
 #
 quarkus.ssl.native=true
-#
-# Quarkus :: Camel
-#
-quarkus.camel.disable-jaxb=false
+
 #
 # Quarkus :: Camel :: FHIR
 #
 # The HAPI-FHIR library, on which camel-fhir depends on, heavily uses reflection which affects performance in Quarkus
 # (memory footprint, build time, CPU resources etc...). For the sake of time, only DSTU3 (which is the default FHIR version)
 # tests are enabled for DSTU3 only by default.
-camel.fhir.enable-dstu2=false
-camel.fhir.enable-dstu3=true
-camel.fhir.enable-r4=false
+quarkus.camel.fhir.enable-dstu2=false
+quarkus.camel.fhir.enable-dstu3=true
+quarkus.camel.fhir.enable-r4=false
+
 #
 # Camel
 #


[camel-quarkus] 01/07: chore(build): add a profile to activate native build in containers, default is to build with local native-image

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit cfa44195ec8617408cc5a6165fc3621f6ec1539c
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Thu Oct 24 17:50:00 2019 +0200

    chore(build): add a profile to activate native build in containers, default is to build with local native-image
---
 Jenkinsfile                             |  2 +-
 Jenkinsfile.quarkus                     |  2 +-
 docs/modules/ROOT/pages/user-guide.adoc |  4 ++--
 examples/observability/pom.xml          |  5 -----
 examples/rest-json/pom.xml              | 11 -----------
 examples/timer-log-xml/pom.xml          |  7 -------
 examples/timer-log/pom.xml              |  7 -------
 integration-tests/pom.xml               |  1 -
 pom.xml                                 | 13 +++++++++++++
 9 files changed, 17 insertions(+), 35 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index dec5c9d..aeac2d0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -67,7 +67,7 @@ pipeline {
 
         stage('Test') {
             steps {
-                sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -Dnative -Dnative-image.docker-build=true -f pom.xml"
+                sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -Dnative -Ddocker -f pom.xml"
             }
             post {
                 always {
diff --git a/Jenkinsfile.quarkus b/Jenkinsfile.quarkus
index d426465..6a65eeb 100644
--- a/Jenkinsfile.quarkus
+++ b/Jenkinsfile.quarkus
@@ -56,7 +56,7 @@ pipeline {
 
         stage('Test') {
             steps {
-                sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -U -Pquarkus-snapshots -Dquarkus.version=999-SNAPSHOT -Dnative -Dnative-image.docker-build=true -f pom.xml"
+                sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -U -Pquarkus-snapshots -Dquarkus.version=999-SNAPSHOT -Dnative -Ddocker -f pom.xml"
             }
             post {
                 always {
diff --git a/docs/modules/ROOT/pages/user-guide.adoc b/docs/modules/ROOT/pages/user-guide.adoc
index 4806330..271af72 100644
--- a/docs/modules/ROOT/pages/user-guide.adoc
+++ b/docs/modules/ROOT/pages/user-guide.adoc
@@ -118,7 +118,7 @@ activate the profile that runs them:
 
 [source,shell]
 ----
-mvn clean verify -Dnative -Dnative-image.docker-build=true
+mvn clean verify -Dnative
 ----
 
 This takes about 2.5 minutes (once you have all dependencies cached).
@@ -157,7 +157,7 @@ To prepare a native executable using GraalVM, run the following command:
 
 [source,shell]
 ----
-mvn clean package -Dnative -Dnative-image.docker-build=true
+mvn clean package -Dnative
 ls -lh target
 ...
 -rwxr-xr-x. 1 ppalaga ppalaga  46M Oct 11 18:57  my-app-0.0.1-SNAPSHOT-runner
diff --git a/examples/observability/pom.xml b/examples/observability/pom.xml
index accc6b1..d6dfad0 100644
--- a/examples/observability/pom.xml
+++ b/examples/observability/pom.xml
@@ -31,11 +31,6 @@
     <name>Camel Quarkus :: Examples :: Observability</name>
     <description>Camel Quarkus Example :: Observability</description>
 
-    <properties>
-        <native-image.docker-build>true</native-image.docker-build>
-        <native-image.container-runtime>docker</native-image.container-runtime>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/examples/rest-json/pom.xml b/examples/rest-json/pom.xml
index bd1e4c4..96e4083 100644
--- a/examples/rest-json/pom.xml
+++ b/examples/rest-json/pom.xml
@@ -31,17 +31,6 @@
     <name>Camel Quarkus :: Examples :: Rest Json</name>
     <description>Camel Quarkus Example :: Rest Json</description>
 
-    <properties>
-        <!--
-            Make quarkus use docker by default as native-image does not
-            work anymore due to a Fedora upgrade
-
-            See https://github.com/oracle/graal/issues/1582
-         -->
-        <native-image.docker-build>true</native-image.docker-build>
-        <native-image.container-runtime>docker</native-image.container-runtime>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/examples/timer-log-xml/pom.xml b/examples/timer-log-xml/pom.xml
index 23e388a..6d08004 100644
--- a/examples/timer-log-xml/pom.xml
+++ b/examples/timer-log-xml/pom.xml
@@ -31,13 +31,6 @@
     <name>Camel Quarkus :: Examples :: Timer Log XML</name>
     <description>Camel Quarkus Example :: Timer to Log XML</description>
 
-    <properties>
-        <!-- to use docker build instead of native
-        <native-image.docker-build>true</native-image.docker-build>
-        <native-image.container-runtime>docker</native-image.container-runtime>
-        -->
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/examples/timer-log/pom.xml b/examples/timer-log/pom.xml
index db54f80..6dc503c 100644
--- a/examples/timer-log/pom.xml
+++ b/examples/timer-log/pom.xml
@@ -31,13 +31,6 @@
     <name>Camel Quarkus :: Examples :: Timer Log</name>
     <description>Camel Quarkus Example :: Timer to Log</description>
 
-    <properties>
-        <!-- to use docker build instead of native
-        <native-image.docker-build>true</native-image.docker-build>
-        <native-image.container-runtime>docker</native-image.container-runtime>
-        -->
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 5d162c1..7c3ae0a 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -130,7 +130,6 @@
                 </executions>
             </plugin>
         </plugins>
-
     </build>
 
 </project>
diff --git a/pom.xml b/pom.xml
index 3cefd31..6efe715 100644
--- a/pom.xml
+++ b/pom.xml
@@ -475,6 +475,19 @@
                 </pluginRepository>
             </pluginRepositories>
         </profile>
+
+        <profile>
+            <id>quarkus-docker</id>
+            <activation>
+                <property>
+                    <name>docker</name>
+                </property>
+            </activation>
+            <properties>
+                <native-image.docker-build>true</native-image.docker-build>
+                <native-image.container-runtime>docker</native-image.container-runtime>
+            </properties>
+        </profile>
     </profiles>
 
 </project>


[camel-quarkus] 04/07: chore: fix dependencies issues reported during augmentation phase

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 0c48f79abbd194506556103888c09cb582577185
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Thu Oct 24 19:46:47 2019 +0200

    chore: fix dependencies issues reported during augmentation phase
---
 integration-tests/fhir/pom.xml       | 2 +-
 integration-tests/salesforce/pom.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/integration-tests/fhir/pom.xml b/integration-tests/fhir/pom.xml
index 41938c1..1b1547d 100644
--- a/integration-tests/fhir/pom.xml
+++ b/integration-tests/fhir/pom.xml
@@ -43,7 +43,7 @@
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-resteasy</artifactId>
+            <artifactId>quarkus-resteasy-jsonb</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/integration-tests/salesforce/pom.xml b/integration-tests/salesforce/pom.xml
index c7654b2..eecec0c 100644
--- a/integration-tests/salesforce/pom.xml
+++ b/integration-tests/salesforce/pom.xml
@@ -44,7 +44,7 @@
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-resteasy</artifactId>
+            <artifactId>quarkus-resteasy-jsonb</artifactId>
         </dependency>
 
         <!-- test dependencies -->


[camel-quarkus] 06/07: fhir: build time config options (improved)

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 35529af24e16e073182cd08aae34e433d68a2092
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Fri Oct 25 01:38:14 2019 +0200

    fhir: build time config options (improved)
---
 .../java/org/apache/camel/quarkus/component/fhir/FhirConfig.java  | 8 ++++----
 integration-tests/fhir/pom.xml                                    | 2 ++
 .../camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java    | 5 ++---
 .../camel/quarkus/component/fhir/it/FhirDstu3RouteBuilder.java    | 4 ++--
 .../camel/quarkus/component/fhir/it/FhirR4RouteBuilder.java       | 5 ++---
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
index a2b05f0..e2dd4c7 100644
--- a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
+++ b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
@@ -20,24 +20,24 @@ import io.quarkus.runtime.annotations.ConfigItem;
 import io.quarkus.runtime.annotations.ConfigPhase;
 import io.quarkus.runtime.annotations.ConfigRoot;
 
-@ConfigRoot(name = "camel.fhir", phase = ConfigPhase.BUILD_TIME)
+@ConfigRoot(name = "camel.fhir", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
 public final class FhirConfig {
 
     /**
      * Enable FHIR DSTU2 Specs.
      */
-    @ConfigItem(defaultValue = "true")
+    @ConfigItem(name = "enable-dstu2", defaultValue = "true")
     public boolean enableDstu2;
 
     /**
      * Enable FHIR DSTU3 Specs.
      */
-    @ConfigItem(defaultValue = "false")
+    @ConfigItem(name = "enable-dstu3", defaultValue = "true")
     public boolean enableDstu3;
 
     /**
      * Enable FHIR R4 Specs.
      */
-    @ConfigItem(defaultValue = "true")
+    @ConfigItem(name = "enable-r4", defaultValue = "true")
     public boolean enableR4;
 }
diff --git a/integration-tests/fhir/pom.xml b/integration-tests/fhir/pom.xml
index 1b1547d..a3172b2 100644
--- a/integration-tests/fhir/pom.xml
+++ b/integration-tests/fhir/pom.xml
@@ -79,8 +79,10 @@
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <systemProperties combine.children="append">
+                        <!--
                         <quarkus.camel.fhir.enable-dstu2>true</quarkus.camel.fhir.enable-dstu2>
                         <quarkus.camel.fhir.enable-r4>true</quarkus.camel.fhir.enable-r4>
+                        -->
                     </systemProperties>
                 </configuration>
             </plugin>
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java
index 92a7cdb..fcb8122 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java
@@ -23,11 +23,10 @@ import org.apache.camel.component.fhir.FhirXmlDataFormat;
 import org.apache.camel.quarkus.component.fhir.FhirFlags;
 
 public class FhirDstu2RouteBuilder extends RouteBuilder {
-
+    private static final Boolean ENABLED = new FhirFlags.Dstu2Enabled().getAsBoolean();
     @Override
     public void configure() {
-        Boolean dstu2 = new FhirFlags.Dstu2Enabled().getAsBoolean();
-        if (dstu2) {
+        if (ENABLED) {
             FhirJsonDataFormat fhirJsonDataFormat = new FhirJsonDataFormat();
             fhirJsonDataFormat.setFhirVersion(FhirVersionEnum.DSTU2.name());
 
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3RouteBuilder.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3RouteBuilder.java
index f93b2d2..2b1a5ea 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3RouteBuilder.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3RouteBuilder.java
@@ -23,11 +23,11 @@ import org.apache.camel.component.fhir.FhirXmlDataFormat;
 import org.apache.camel.quarkus.component.fhir.FhirFlags;
 
 public class FhirDstu3RouteBuilder extends RouteBuilder {
+    private static final Boolean ENABLED = new FhirFlags.Dstu3Enabled().getAsBoolean();
 
     @Override
     public void configure() {
-        Boolean dstu3 = new FhirFlags.Dstu3Enabled().getAsBoolean();
-        if (dstu3) {
+        if (ENABLED) {
             FhirJsonDataFormat fhirJsonDataFormat = new FhirJsonDataFormat();
             fhirJsonDataFormat.setFhirVersion(FhirVersionEnum.DSTU3.name());
 
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4RouteBuilder.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4RouteBuilder.java
index 03641a6..2622534 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4RouteBuilder.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4RouteBuilder.java
@@ -23,12 +23,11 @@ import org.apache.camel.component.fhir.FhirXmlDataFormat;
 import org.apache.camel.quarkus.component.fhir.FhirFlags;
 
 public class FhirR4RouteBuilder extends RouteBuilder {
+    private static final Boolean ENABLED = new FhirFlags.R4Enabled().getAsBoolean();
 
     @Override
     public void configure() {
-        Boolean r4 = new FhirFlags.R4Enabled().getAsBoolean();
-
-        if (r4) {
+        if (ENABLED) {
             FhirJsonDataFormat fhirJsonDataFormat = new FhirJsonDataFormat();
             fhirJsonDataFormat.setFhirVersion(FhirVersionEnum.R4.name());
 


[camel-quarkus] 05/07: chore: fix cs

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit cbba43987f167618f1efc10b872ea6fe87f7a1aa
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Thu Oct 24 20:17:39 2019 +0200

    chore: fix cs
---
 .../src/main/resources/routes/my-routes.xml        |  4 ++++
 .../deployment/AttachmentsProcessor.java           |  7 +++---
 .../component/attachments/AttachmentsRecorder.java |  6 ++---
 .../quarkus/core/deployment/BuildProcessor.java    |  2 +-
 .../core/deployment/UploadAttacherBuildItem.java   |  4 ++--
 .../deployment/MicroProfileHealthProcessor.java    |  4 ++--
 .../platform/http/PlatformHttpEndpoint.java        |  2 +-
 .../http/runtime/QuarkusPlatformHttpConsumer.java  | 25 ++++++++++----------
 .../test/src/test/resources/my-routes.xml          |  4 ++++
 .../component/fhir/it/FhirDstu2Resource.java       |  5 ++--
 .../component/fhir/it/FhirDstu2RouteBuilder.java   |  2 +-
 .../component/fhir/it/FhirDstu3Resource.java       |  5 ++--
 .../quarkus/component/fhir/it/FhirR4Resource.java  |  5 ++--
 .../camel/quarkus/component/fhir/it/FhirTest.java  | 27 ++++++++++++++--------
 .../http/server/it/PlatformHttpEngineTest.java     |  3 +--
 .../platform/http/it/PlatformHttpRouteBuilder.java |  2 ++
 .../component/http/server/it/PlatformHttpTest.java |  9 ++++----
 17 files changed, 66 insertions(+), 50 deletions(-)

diff --git a/examples/timer-log-xml/src/main/resources/routes/my-routes.xml b/examples/timer-log-xml/src/main/resources/routes/my-routes.xml
index 550b49b..42fd73f 100644
--- a/examples/timer-log-xml/src/main/resources/routes/my-routes.xml
+++ b/examples/timer-log-xml/src/main/resources/routes/my-routes.xml
@@ -1,17 +1,21 @@
 <?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.
+
 -->
 <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://camel.apache.org/schema/spring"
diff --git a/extensions/attachments/deployment/src/main/java/org/apache/camel/quarkus/component/attachments/deployment/AttachmentsProcessor.java b/extensions/attachments/deployment/src/main/java/org/apache/camel/quarkus/component/attachments/deployment/AttachmentsProcessor.java
index 6e1ce60..6b60066 100644
--- a/extensions/attachments/deployment/src/main/java/org/apache/camel/quarkus/component/attachments/deployment/AttachmentsProcessor.java
+++ b/extensions/attachments/deployment/src/main/java/org/apache/camel/quarkus/component/attachments/deployment/AttachmentsProcessor.java
@@ -16,14 +16,13 @@
  */
 package org.apache.camel.quarkus.component.attachments.deployment;
 
-import org.apache.camel.quarkus.component.attachments.AttachmentsRecorder;
-import org.apache.camel.quarkus.core.UploadAttacher;
-import org.apache.camel.quarkus.core.deployment.UploadAttacherBuildItem;
-
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
+import org.apache.camel.quarkus.component.attachments.AttachmentsRecorder;
+import org.apache.camel.quarkus.core.UploadAttacher;
+import org.apache.camel.quarkus.core.deployment.UploadAttacherBuildItem;
 
 class AttachmentsProcessor {
 
diff --git a/extensions/attachments/runtime/src/main/java/org/apache/camel/quarkus/component/attachments/AttachmentsRecorder.java b/extensions/attachments/runtime/src/main/java/org/apache/camel/quarkus/component/attachments/AttachmentsRecorder.java
index 8485755..db8bdde 100644
--- a/extensions/attachments/runtime/src/main/java/org/apache/camel/quarkus/component/attachments/AttachmentsRecorder.java
+++ b/extensions/attachments/runtime/src/main/java/org/apache/camel/quarkus/component/attachments/AttachmentsRecorder.java
@@ -17,17 +17,15 @@
 package org.apache.camel.quarkus.component.attachments;
 
 import java.io.File;
-
 import javax.activation.DataHandler;
 
+import io.quarkus.runtime.RuntimeValue;
+import io.quarkus.runtime.annotations.Recorder;
 import org.apache.camel.Message;
 import org.apache.camel.attachment.AttachmentMessage;
 import org.apache.camel.quarkus.core.UploadAttacher;
 import org.jboss.logging.Logger;
 
-import io.quarkus.runtime.RuntimeValue;
-import io.quarkus.runtime.annotations.Recorder;
-
 @Recorder
 public class AttachmentsRecorder {
 
diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java
index 9280764..e663ad4 100644
--- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java
+++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java
@@ -35,13 +35,13 @@ import io.quarkus.deployment.recording.RecorderContext;
 import io.quarkus.runtime.RuntimeValue;
 import org.apache.camel.CamelContext;
 import org.apache.camel.RoutesBuilder;
-import org.apache.camel.quarkus.core.CoreAttachmentsRecorder;
 import org.apache.camel.quarkus.core.CamelConfig;
 import org.apache.camel.quarkus.core.CamelMain;
 import org.apache.camel.quarkus.core.CamelMainProducers;
 import org.apache.camel.quarkus.core.CamelMainRecorder;
 import org.apache.camel.quarkus.core.CamelProducers;
 import org.apache.camel.quarkus.core.CamelRecorder;
+import org.apache.camel.quarkus.core.CoreAttachmentsRecorder;
 import org.apache.camel.quarkus.core.Flags;
 import org.apache.camel.quarkus.core.UploadAttacher;
 import org.apache.camel.spi.Registry;
diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/UploadAttacherBuildItem.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/UploadAttacherBuildItem.java
index b0944a5..73bfc30 100644
--- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/UploadAttacherBuildItem.java
+++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/UploadAttacherBuildItem.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.quarkus.core.deployment;
 
-import org.apache.camel.quarkus.core.UploadAttacher;
-
 import io.quarkus.builder.item.SimpleBuildItem;
 import io.quarkus.runtime.RuntimeValue;
 
+import org.apache.camel.quarkus.core.UploadAttacher;
+
 /**
  * Holds the {@link UploadAttacher} {@link RuntimeValue}.
  * <p>
diff --git a/extensions/microprofile-health/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/health/deployment/MicroProfileHealthProcessor.java b/extensions/microprofile-health/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/health/deployment/MicroProfileHealthProcessor.java
index 4bcfafd..e61cb6e 100644
--- a/extensions/microprofile-health/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/health/deployment/MicroProfileHealthProcessor.java
+++ b/extensions/microprofile-health/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/health/deployment/MicroProfileHealthProcessor.java
@@ -121,7 +121,7 @@ class MicroProfileHealthProcessor {
 
     private boolean isCamelMicroProfileHealthCheck(ClassInfo classInfo) {
         String className = classInfo.name().toString();
-        return ((className.startsWith(AbstractCamelMicroProfileHealthCheck.class.getPackage().getName())) &&
-                (classInfo.classAnnotation(MICROPROFILE_LIVENESS_DOTNAME) != null || classInfo.classAnnotation(MICROPROFILE_READINESS_DOTNAME) != null));
+        return className.startsWith(AbstractCamelMicroProfileHealthCheck.class.getPackage().getName())
+            && (classInfo.classAnnotation(MICROPROFILE_LIVENESS_DOTNAME) != null || classInfo.classAnnotation(MICROPROFILE_READINESS_DOTNAME) != null);
     }
 }
diff --git a/extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java b/extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java
index 653c58f..f7d7c3a 100644
--- a/extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java
+++ b/extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java
@@ -46,7 +46,7 @@ public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoi
 
     @UriParam(label = "consumer,advanced", description = "A comma or whitespace separated list of file extensions."
             + " Uploads having these extensions will be stored locally."
-            +" Null value or asterisk (*) will allow all files.")
+            + " Null value or asterisk (*) will allow all files.")
     private String fileNameExtWhitelist;
 
     @UriParam(label = "advanced")
diff --git a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java b/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java
index fa026ab..5f30a39 100644
--- a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java
+++ b/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java
@@ -31,6 +31,17 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
+import io.vertx.core.Handler;
+import io.vertx.core.MultiMap;
+import io.vertx.core.buffer.Buffer;
+import io.vertx.core.http.HttpMethod;
+import io.vertx.core.http.HttpServerRequest;
+import io.vertx.core.http.HttpServerResponse;
+import io.vertx.ext.web.FileUpload;
+import io.vertx.ext.web.Route;
+import io.vertx.ext.web.Router;
+import io.vertx.ext.web.RoutingContext;
+
 import org.apache.camel.Consumer;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
@@ -51,17 +62,6 @@ import org.apache.camel.support.ObjectHelper;
 import org.apache.camel.util.FileUtil;
 import org.jboss.logging.Logger;
 
-import io.vertx.core.Handler;
-import io.vertx.core.MultiMap;
-import io.vertx.core.buffer.Buffer;
-import io.vertx.core.http.HttpMethod;
-import io.vertx.core.http.HttpServerRequest;
-import io.vertx.core.http.HttpServerResponse;
-import io.vertx.ext.web.FileUpload;
-import io.vertx.ext.web.Route;
-import io.vertx.ext.web.Router;
-import io.vertx.ext.web.RoutingContext;
-
 /**
  * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}.
  */
@@ -334,8 +334,7 @@ public class QuarkusPlatformHttpConsumer extends DefaultConsumer {
         final Message result = new DefaultMessage(exchange);
 
         final HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy();
-        System.out.println("headerFilterStrategy = "+  headerFilterStrategy);
-        populateCamelHeaders(ctx, result.getHeaders(), exchange, headerFilterStrategy );
+        populateCamelHeaders(ctx, result.getHeaders(), exchange, headerFilterStrategy);
         final String mimeType = ctx.parsedHeaders().contentType().value();
         final boolean isMultipartFormData = "multipart/form-data".equals(mimeType);
         if ("application/x-www-form-urlencoded".equals(mimeType) || isMultipartFormData) {
diff --git a/integration-tests/core-main/test/src/test/resources/my-routes.xml b/integration-tests/core-main/test/src/test/resources/my-routes.xml
index c7605b7..482befb 100644
--- a/integration-tests/core-main/test/src/test/resources/my-routes.xml
+++ b/integration-tests/core-main/test/src/test/resources/my-routes.xml
@@ -1,17 +1,21 @@
 <?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.
+
 -->
 <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://camel.apache.org/schema/spring"
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2Resource.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2Resource.java
index fcc22ec..5de541c 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2Resource.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2Resource.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.quarkus.component.fhir.it;
 
+import java.io.InputStream;
+import java.net.URI;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.ws.rs.Consumes;
@@ -24,8 +26,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
-import java.io.InputStream;
-import java.net.URI;
+
 import ca.uhn.fhir.rest.api.MethodOutcome;
 import org.apache.camel.ProducerTemplate;
 
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java
index 06107eb..92a7cdb 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu2RouteBuilder.java
@@ -26,7 +26,7 @@ public class FhirDstu2RouteBuilder extends RouteBuilder {
 
     @Override
     public void configure() {
-        Boolean dstu2 = new FhirFlags.Dstu2Enabled().getAsBoolean();;
+        Boolean dstu2 = new FhirFlags.Dstu2Enabled().getAsBoolean();
         if (dstu2) {
             FhirJsonDataFormat fhirJsonDataFormat = new FhirJsonDataFormat();
             fhirJsonDataFormat.setFhirVersion(FhirVersionEnum.DSTU2.name());
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3Resource.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3Resource.java
index a7a9614..4036c78 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3Resource.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirDstu3Resource.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.quarkus.component.fhir.it;
 
+import java.io.InputStream;
+import java.net.URI;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.ws.rs.Consumes;
@@ -24,8 +26,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
-import java.io.InputStream;
-import java.net.URI;
+
 import ca.uhn.fhir.rest.api.MethodOutcome;
 import org.apache.camel.ProducerTemplate;
 
diff --git a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4Resource.java b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4Resource.java
index 3e914ed..5e92916 100644
--- a/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4Resource.java
+++ b/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/FhirR4Resource.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.quarkus.component.fhir.it;
 
+import java.io.InputStream;
+import java.net.URI;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.ws.rs.Consumes;
@@ -24,8 +26,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
-import java.io.InputStream;
-import java.net.URI;
+
 import ca.uhn.fhir.rest.api.MethodOutcome;
 import org.apache.camel.ProducerTemplate;
 
diff --git a/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/FhirTest.java b/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/FhirTest.java
index 84b0aa8..c9f9329 100644
--- a/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/FhirTest.java
+++ b/integration-tests/fhir/src/test/java/org/apache/camel/quarkus/component/fhir/it/FhirTest.java
@@ -37,8 +37,9 @@ class FhirTest {
 
     @Test
     public void jsonDstu2() {
-        if(!dstu2)
+        if (!dstu2) {
             return;
+        }
         final ca.uhn.fhir.model.dstu2.resource.Patient patient = getDstu2Patient();
         String patientString = FhirContext.forDstu2().newJsonParser().encodeResourceToString(patient);
         RestAssured.given() //
@@ -48,8 +49,9 @@ class FhirTest {
 
     @Test
     public void xmlDstu2() {
-        if(!dstu2)
+        if (!dstu2) {
             return;
+        }
 
         final ca.uhn.fhir.model.dstu2.resource.Patient patient = getDstu2Patient();
         String patientString = FhirContext.forDstu2().newXmlParser().encodeResourceToString(patient);
@@ -60,8 +62,9 @@ class FhirTest {
 
     @Test
     public void fhirClientDstu2() {
-        if(!dstu2)
+        if (!dstu2) {
             return;
+        }
 
         final ca.uhn.fhir.model.dstu2.resource.Patient patient = getDstu2Patient();
         String patientString = FhirContext.forDstu2().newJsonParser().encodeResourceToString(patient);
@@ -72,8 +75,9 @@ class FhirTest {
 
     @Test
     public void jsonDstu3() {
-        if(!dstu3)
+        if (!dstu3) {
             return;
+        }
 
         final Patient patient = getDstu3Patient();
         String patientString = FhirContext.forDstu3().newJsonParser().encodeResourceToString(patient);
@@ -84,8 +88,9 @@ class FhirTest {
 
     @Test
     public void xmlDstu3() {
-        if(!dstu3)
+        if (!dstu3) {
             return;
+        }
 
         final Patient patient = getDstu3Patient();
         String patientString = FhirContext.forDstu3().newXmlParser().encodeResourceToString(patient);
@@ -96,8 +101,9 @@ class FhirTest {
 
     @Test
     public void fhirClientDstu3() {
-        if(!dstu3)
+        if (!dstu3) {
             return;
+        }
 
         final Patient patient = getDstu3Patient();
         String patientString = FhirContext.forDstu3().newJsonParser().encodeResourceToString(patient);
@@ -108,8 +114,9 @@ class FhirTest {
 
     @Test
     public void jsonR4() {
-        if(!r4)
+        if (!r4) {
             return;
+        }
 
         final org.hl7.fhir.r4.model.Patient patient = getR4Patient();
         String patientString = FhirContext.forR4().newJsonParser().encodeResourceToString(patient);
@@ -120,8 +127,9 @@ class FhirTest {
 
     @Test
     public void xmlR4() {
-        if(!r4)
+        if (!r4) {
             return;
+        }
 
         final org.hl7.fhir.r4.model.Patient patient = getR4Patient();
         String patientString = FhirContext.forR4().newXmlParser().encodeResourceToString(patient);
@@ -132,8 +140,9 @@ class FhirTest {
 
     @Test
     public void fhirClientR4() {
-        if(!r4)
+        if (!r4) {
             return;
+        }
 
         final org.hl7.fhir.r4.model.Patient patient = getR4Patient();
         String patientString = FhirContext.forR4().newJsonParser().encodeResourceToString(patient);
diff --git a/integration-tests/platform-http-engine/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpEngineTest.java b/integration-tests/platform-http-engine/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpEngineTest.java
index c8aecd6..aa1ac15 100644
--- a/integration-tests/platform-http-engine/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpEngineTest.java
+++ b/integration-tests/platform-http-engine/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpEngineTest.java
@@ -38,8 +38,7 @@ class PlatformHttpEngineTest {
                 .body(
                     PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME, is(QuarkusPlatformHttpEngine.class.getName()),
                     PlatformHttpConstants.PLATFORM_HTTP_COMPONENT_NAME, is(PlatformHttpComponent.class.getName()),
-                    "handlers-size", is(2)
-                );
+                    "handlers-size", is(2));
     }
 
     @Test
diff --git a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
index 98b3a0d..5ddf310 100644
--- a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
+++ b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
@@ -27,7 +27,9 @@ import org.apache.camel.Exchange;
 import org.apache.camel.attachment.AttachmentMessage;
 import org.apache.camel.builder.RouteBuilder;
 
+
 public class PlatformHttpRouteBuilder extends RouteBuilder {
+    @SuppressWarnings("unchecked")
     @Override
     public void configure() {
         rest()
diff --git a/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java b/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
index 6b19606..d1eba8f 100644
--- a/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
+++ b/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
@@ -16,18 +16,17 @@
  */
 package org.apache.camel.quarkus.component.http.server.it;
 
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
+
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
-
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.StandardCharsets;
-
 @QuarkusTest
 class PlatformHttpTest {
     @Test
@@ -134,7 +133,7 @@ class PlatformHttpTest {
         final String outgoingEncoding = "ISO-8859-2";
         final String bodyText = "Ťava dvojhrbá"; // Camelus bactrianus in Slovak
         final byte[] returnedBytes = RestAssured.given()
-            .contentType("text/plain; charset="+ outgoingEncoding)
+            .contentType("text/plain; charset=" + outgoingEncoding)
             .body(bodyText.getBytes(outgoingEncoding))
             .post("/platform-http/encoding")
             .then()


[camel-quarkus] 03/07: chore: fix unchecked cast warning

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 80d34206e64dfa9d3390c14c06c9d3aeb04a8b2d
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Thu Oct 24 19:45:56 2019 +0200

    chore: fix unchecked cast warning
---
 .../microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java b/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
index 314d5f3..6d19cf0 100644
--- a/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
+++ b/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
@@ -34,7 +34,7 @@ import org.eclipse.microprofile.metrics.MetricRegistry;
 public class CamelMicroProfileMetricsRecorder {
 
     public RuntimeValue<MetricRegistry> createApplicationRegistry() {
-        return new RuntimeValue(MetricRegistries.get(MetricRegistry.Type.APPLICATION));
+        return new RuntimeValue<>(MetricRegistries.get(MetricRegistry.Type.APPLICATION));
     }
 
     public void configureCamelContext(CamelMicroProfileMetricsConfig config, BeanContainer beanContainer) {


[camel-quarkus] 07/07: fhir: update doc doc

Posted by lb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit edec6989ceacbd29aa7dfd9d7399c16e9dac5995
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Fri Oct 25 01:40:03 2019 +0200

    fhir: update doc doc
---
 docs/modules/ROOT/pages/extensions/fhir.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/modules/ROOT/pages/extensions/fhir.adoc b/docs/modules/ROOT/pages/extensions/fhir.adoc
index 871f3b7..d6aac97 100644
--- a/docs/modules/ROOT/pages/extensions/fhir.adoc
+++ b/docs/modules/ROOT/pages/extensions/fhir.adoc
@@ -25,9 +25,9 @@ The extension supports the Camel https://camel.apache.org/components/latest/fhir
 
 The https://hapifhir.io/download.html[hapi-fhir] library, on which camel-fhir depends on, heavily uses reflection which affects performance in Quarkus (memory footprint, build time, CPU resources etc...). The following options are provided to improve on this:
 
-* `camel.fhir.enable-dstu2`: enables dstu2 resources, default `true`
-* `camel.fhir.enable-dstu3`: enables dstu3 resources, default `true`
-* `camel.fhir.enable-r4`: : enables r4 resources, default `true`
+* `quarkus.camel.fhir.enable-dstu2`: enables dstu2 resources, default `true`
+* `quarkus.camel.fhir.enable-dstu3`: enables dstu3 resources, default `true`
+* `quarkus.camel.fhir.enable-r4`: : enables r4 resources, default `true`
 
 which can be configured within the `application.properties` configuration file.