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

Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 04a5f0e3aeebee5ef817d921d6a17e250e1c1213
Author: croway <[email protected]>
AuthorDate: Fri Jul 10 18:14:37 2026 +0200

    CAMEL-24000: camel-spring-boot - remove dead code from core 
auto-configuration
    
    - HierarchicalCondition and CompositeConversionService are referenced by
      nothing in the repository
    - ClusteredRouteControllerConfiguration.clusterServiceRef has no accessors,
      so it can never be bound nor read
    - unused ConditionalOnAvailableEndpoint import in
      CamelDevConsoleAutoConfiguration
    
    Co-Authored-By: Claude Fable 5 <[email protected]>
---
 .../console/CamelDevConsoleAutoConfiguration.java  |  1 -
 .../ClusteredRouteControllerConfiguration.java     |  5 --
 .../boot/util/CompositeConversionService.java      | 82 ----------------------
 .../spring/boot/util/HierarchicalCondition.java    | 48 -------------
 4 files changed, 136 deletions(-)

diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/console/CamelDevConsoleAutoConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/console/CamelDevConsoleAutoConfiguration.java
index 0ae35238ece..d5d918be5f8 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/console/CamelDevConsoleAutoConfiguration.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/console/CamelDevConsoleAutoConfiguration.java
@@ -19,7 +19,6 @@ package org.apache.camel.spring.boot.actuate.console;
 import org.apache.camel.CamelContext;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import 
org.apache.camel.spring.boot.actuate.endpoint.CamelRouteControllerEndpoint;
-import 
org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
 import org.springframework.boot.autoconfigure.AutoConfiguration;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cluster/ClusteredRouteControllerConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cluster/ClusteredRouteControllerConfiguration.java
index ca32cbd0f09..8d3bf32d47c 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cluster/ClusteredRouteControllerConfiguration.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cluster/ClusteredRouteControllerConfiguration.java
@@ -39,11 +39,6 @@ public class ClusteredRouteControllerConfiguration {
      */
     private String namespace;
 
-    /**
-     * The reference to a cluster service.
-     */
-    private String clusterServiceRef;
-
     /**
      * The cluster service.
      */
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CompositeConversionService.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CompositeConversionService.java
deleted file mode 100644
index d649135515b..00000000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/CompositeConversionService.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.spring.boot.util;
-
-import java.util.List;
-import org.springframework.core.convert.ConversionException;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.core.convert.TypeDescriptor;
-
-public class CompositeConversionService implements ConversionService {
-    private final List<ConversionService> delegates;
-
-    public CompositeConversionService(List<ConversionService> delegates) {
-        this.delegates = delegates;
-    }
-
-    @Override
-    public boolean canConvert(Class<?> sourceType, Class<?> targetType) {
-        for (ConversionService service : this.delegates) {
-            if (service.canConvert(sourceType, targetType)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public boolean canConvert(TypeDescriptor sourceType, TypeDescriptor 
targetType) {
-        for (ConversionService service : this.delegates) {
-            if (service.canConvert(sourceType, targetType)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public <T> T convert(Object source, Class<T> targetType) {
-        for (int i = 0; i < this.delegates.size() - 1; i++) {
-            try {
-                ConversionService delegate = this.delegates.get(i);
-                if (delegate.canConvert(source.getClass(), targetType)) {
-                    return delegate.convert(source, targetType);
-                }
-            } catch (ConversionException e) {
-                // ignored
-            }
-        }
-
-        return this.delegates.get(this.delegates.size() - 1).convert(source, 
targetType);
-    }
-
-    @Override
-    public Object convert(Object source, TypeDescriptor sourceType, 
TypeDescriptor targetType) {
-        for (int i = 0; i < this.delegates.size() - 1; i++) {
-            try {
-                ConversionService delegate = this.delegates.get(i);
-                if (delegate.canConvert(sourceType, targetType)) {
-                    return delegate.convert(source, sourceType, targetType);
-                }
-            } catch (ConversionException e) {
-                // ignored
-            }
-        }
-
-        return this.delegates.get(this.delegates.size() - 1).convert(source, 
sourceType, targetType);
-    }
-}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/HierarchicalCondition.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/HierarchicalCondition.java
deleted file mode 100644
index 261f9b149c4..00000000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/util/HierarchicalCondition.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.spring.boot.util;
-
-import java.util.Arrays;
-import org.springframework.boot.autoconfigure.condition.ConditionMessage;
-import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
-import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.core.env.Environment;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-public class HierarchicalCondition extends SpringBootCondition {
-    private final String[] items;
-
-    public HierarchicalCondition(String... items) {
-        this.items = Arrays.copyOf(items, items.length);
-    }
-
-    @Override
-    public ConditionOutcome getMatchOutcome(ConditionContext conditionContext,
-            AnnotatedTypeMetadata annotatedTypeMetadata) {
-        if (items.length == 0) {
-            return ConditionOutcome.match(ConditionMessage.forCondition("no 
condition").because("no conditions"));
-        }
-
-        final ConditionMessage.Builder message = 
ConditionMessage.forCondition(this.items[0]);
-        final Environment environment = conditionContext.getEnvironment();
-
-        return HierarchicalPropertiesEvaluator.evaluate(environment, items)
-                ? ConditionOutcome.match(message.because("enabled"))
-                : ConditionOutcome.noMatch(message.because("not enabled"));
-    }
-}

Reply via email to