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

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


The following commit(s) were added to refs/heads/main by this push:
     new bf8efd4a72a Remove Capability
bf8efd4a72a is described below

commit bf8efd4a72a7789215918a2b227862b6bea8e997
Author: Croway <federico.mariani.1...@gmail.com>
AuthorDate: Wed Oct 2 15:26:40 2024 +0200

    Remove Capability
---
 .../springboot/catalog/SpringBootRuntimeProvider.java | 19 -------------------
 .../catalog/SpringBootRuntimeProviderTest.java        | 18 ------------------
 2 files changed, 37 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
 
b/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
index bb4ae199c9f..0ce126499a2 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
@@ -21,8 +21,6 @@ import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
 
 import org.apache.camel.catalog.CamelCatalog;
 import org.apache.camel.catalog.RuntimeProvider;
@@ -48,7 +46,6 @@ public class SpringBootRuntimeProvider implements 
RuntimeProvider {
     private static final String CONSOLES_CATALOG = 
"org/apache/camel/springboot/catalog/dev-consoles.properties";
     private static final String OTHER_CATALOG = 
"org/apache/camel/springboot/catalog/others.properties";
     private static final String BEAN_CATALOG = 
"org/apache/camel/springboot/catalog/beans.properties";
-    private static final String CAPABILITIES_CATALOG = 
"org/apache/camel/springboot/catalog/capabilities.properties";
 
     private CamelCatalog camelCatalog;
 
@@ -147,22 +144,6 @@ public class SpringBootRuntimeProvider implements 
RuntimeProvider {
         return findNames(BEAN_CATALOG);
     }
 
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    @Override
-    public Map<String, String> findCapabilities() {
-        final Properties properties = new Properties();
-
-        try (InputStream is = 
getCamelCatalog().getVersionManager().getResourceAsStream(CAPABILITIES_CATALOG))
 {
-            if (is != null) {
-                properties.load(is);
-            }
-        } catch (IOException e) {
-            // ignore
-        }
-
-        return new TreeMap<>((Map<String, String>) (Map) properties);
-    }
-
     private List<String> findNames(String pathToPropertyCatalogDescriptor) {
         List<String> names = new ArrayList<>();
         try (InputStream is = 
camelCatalog.getVersionManager().getResourceAsStream(pathToPropertyCatalogDescriptor))
 {
diff --git 
a/catalog/camel-catalog-provider-springboot/src/test/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProviderTest.java
 
b/catalog/camel-catalog-provider-springboot/src/test/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProviderTest.java
index 833783a6085..7b3739c4ec8 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/test/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProviderTest.java
+++ 
b/catalog/camel-catalog-provider-springboot/src/test/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProviderTest.java
@@ -17,13 +17,9 @@
 package org.apache.camel.springboot.catalog;
 
 import java.util.List;
-import java.util.Optional;
 
 import org.apache.camel.catalog.CamelCatalog;
 import org.apache.camel.catalog.DefaultCamelCatalog;
-import org.apache.camel.tooling.model.EntityRef;
-import org.apache.camel.tooling.model.Kind;
-import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 
@@ -138,18 +134,4 @@ public class SpringBootRuntimeProviderTest {
         assertTrue(json.contains("camel-lra-starter"));
     }
 
-    @Test
-    public void capabilities() {
-        List<String> list = catalog.findCapabilityNames();
-        Assertions.assertEquals(1, list.size());
-
-        Optional<EntityRef> ref = catalog.findCapabilityRef("platform-http");
-        Assertions.assertTrue(ref.isPresent());
-        Assertions.assertEquals(Kind.component, ref.get().kind());
-        Assertions.assertEquals("platform-http", ref.get().name());
-
-        Optional<EntityRef> ref2 = 
catalog.findCapabilityRef("not-implemented");
-        Assertions.assertFalse(ref2.isPresent());
-    }
-
 }

Reply via email to