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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1d032c31a495276a219d70f69e9caa80f32b2816
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Dec 8 10:04:44 2021 +0100

    Polished
---
 .../camel/component/platform/http/PlatformHttpComponent.java | 12 +++++-------
 .../platform/http/JettyCustomPlatformHttpEngine.java         |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
 
b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
index ead93d6..f67b023 100644
--- 
a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
+++ 
b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpComponent.java
@@ -45,14 +45,14 @@ import org.slf4j.LoggerFactory;
  */
 @Component("platform-http")
 public class PlatformHttpComponent extends DefaultComponent implements 
RestConsumerFactory, RestApiConsumerFactory {
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(PlatformHttpComponent.class);
+    private static final Logger LOG = 
LoggerFactory.getLogger(PlatformHttpComponent.class);
 
     @Metadata(label = "advanced", description = "An HTTP Server engine 
implementation to serve the requests")
     private volatile PlatformHttpEngine engine;
 
     private volatile boolean localEngine;
 
-    private final Object lock;
+    private final Object lock = new Object();
 
     public PlatformHttpComponent() {
         this(null);
@@ -60,8 +60,6 @@ public class PlatformHttpComponent extends DefaultComponent 
implements RestConsu
 
     public PlatformHttpComponent(CamelContext context) {
         super(context);
-
-        this.lock = new Object();
     }
 
     @Override
@@ -182,13 +180,13 @@ public class PlatformHttpComponent extends 
DefaultComponent implements RestConsu
         if (engine == null) {
             synchronized (lock) {
                 if (engine == null) {
-                    LOGGER.debug("Lookup platform http engine from registry");
+                    LOG.debug("Lookup platform http engine from registry");
 
                     engine = getCamelContext().getRegistry()
                             
.lookupByNameAndType(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME, 
PlatformHttpEngine.class);
 
                     if (engine == null) {
-                        LOGGER.debug("Lookup platform http engine from 
factory");
+                        LOG.debug("Lookup platform http engine from factory");
 
                         engine = getCamelContext()
                                 .adapt(ExtendedCamelContext.class)
@@ -216,7 +214,7 @@ public class PlatformHttpComponent extends DefaultComponent 
implements RestConsu
         try {
             RestConfiguration config = 
CamelContextHelper.getRestConfiguration(getCamelContext(), "platform-http");
 
-            // configure additional options on  configuration
+            // configure additional options on configuration
             if (config.getComponentProperties() != null && 
!config.getComponentProperties().isEmpty()) {
                 setProperties(this, config.getComponentProperties());
             }
diff --git 
a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpEngine.java
 
b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpEngine.java
index 02adada..c5301f0 100644
--- 
a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpEngine.java
+++ 
b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpEngine.java
@@ -21,9 +21,9 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.platform.http.spi.PlatformHttpEngine;
 
 public class JettyCustomPlatformHttpEngine implements PlatformHttpEngine {
+
     @Override
     public Consumer createConsumer(PlatformHttpEndpoint platformHttpEndpoint, 
Processor processor) {
-
         return new JettyCustomPlatformHttpConsumer(platformHttpEndpoint, 
processor);
     }
 }

Reply via email to