You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/02/17 15:03:41 UTC

[camel] branch main updated: CAMEL-15105: removed unnecessary casts to ExtendedCamelContext within the AbstractCamelContext

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 278fd686ae0 CAMEL-15105: removed unnecessary casts to ExtendedCamelContext within the AbstractCamelContext
278fd686ae0 is described below

commit 278fd686ae043cb13c51cb9f7b8ea76404ad8372
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Feb 17 11:41:42 2023 +0100

    CAMEL-15105: removed unnecessary casts to ExtendedCamelContext within the AbstractCamelContext
---
 .../java/org/apache/camel/impl/engine/AbstractCamelContext.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 726a7344dbd..d87cfde10fd 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -3136,15 +3136,15 @@ public abstract class AbstractCamelContext extends BaseService
         }
         bootstraps.clear();
 
-        if (adapt(ExtendedCamelContext.class).getExchangeFactory().isPooled()) {
+        if (getExchangeFactory().isPooled()) {
             LOG.info(
                     "Pooled mode enabled. Camel pools and reuses objects to reduce JVM object allocations. The pool capacity is: {} elements.",
-                    adapt(ExtendedCamelContext.class).getExchangeFactory().getCapacity());
+                    getExchangeFactory().getCapacity());
         }
         if (isLightweight()) {
             LOG.info("Lightweight mode enabled. Performing optimizations and memory reduction.");
             ReifierStrategy.clearReifiers();
-            adapt(ExtendedCamelContext.class).disposeModel();
+            disposeModel();
         }
     }
 
@@ -3279,7 +3279,7 @@ public abstract class AbstractCamelContext extends BaseService
     }
 
     protected void doStartCamel() throws Exception {
-        if (!adapt(ExtendedCamelContext.class).getBeanPostProcessor().isEnabled()) {
+        if (!getBeanPostProcessor().isEnabled()) {
             LOG.info("BeanPostProcessor is disabled. Dependency injection of Camel annotations in beans is not supported.");
         }
         if (LOG.isDebugEnabled()) {