This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new ff83c4e CAMEL-13708, CAMEL-13721, CAMEL-13694, CAMEL-13720: Fixed compile after little code change ff83c4e is described below commit ff83c4efaaf9d293dded29b5162ab87aec6b64da Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jul 5 05:17:24 2019 +0200 CAMEL-13708, CAMEL-13721, CAMEL-13694, CAMEL-13720: Fixed compile after little code change --- .../org/apache/camel/blueprint/CamelContextFactoryBean.java | 13 ++++++------- .../BlueprintPropertiesLocationElementImplicitTest.java | 3 +-- .../BlueprintPropertiesLocationElementOptionalTest.java | 3 +-- .../blueprint/BlueprintPropertiesLocationElementTest.java | 3 +-- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java index 7007bbf..c4afd2f 100644 --- a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java +++ b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java @@ -20,9 +20,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Properties; -import java.util.function.Function; -import java.util.stream.Collector; -import java.util.stream.Collectors; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; @@ -40,7 +37,6 @@ import org.apache.camel.ShutdownRunningTask; import org.apache.camel.TypeConverterExists; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.properties.PropertiesComponent; -import org.apache.camel.component.properties.PropertiesLocation; import org.apache.camel.core.osgi.OsgiCamelContextPublisher; import org.apache.camel.core.osgi.OsgiEventAdminNotifier; import org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader; @@ -72,6 +68,7 @@ import org.apache.camel.model.transformer.TransformersDefinition; import org.apache.camel.model.validator.ValidatorsDefinition; import org.apache.camel.spi.PackageScanFilter; import org.apache.camel.spi.Registry; +import org.apache.camel.util.StringHelper; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.blueprint.container.BlueprintContainer; @@ -281,9 +278,11 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Blu } List<String> ids = new ArrayList<>(); - for (PropertiesLocation bp : pc.getLocations()) { - if ("blueprint".equals(bp.getResolver())) { - ids.add(bp.getPath()); + for (String bp : pc.getLocations()) { + String resolver = StringHelper.before(bp, ":"); + String path = StringHelper.after(bp, ":"); + if ("blueprint".equals(resolver)) { + ids.add(path); } } if (ids.isEmpty()) { diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java index e9bad4d..14dff3e 100644 --- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java +++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java @@ -20,7 +20,6 @@ import java.util.List; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.properties.PropertiesComponent; -import org.apache.camel.component.properties.PropertiesLocation; import org.junit.Test; public class BlueprintPropertiesLocationElementImplicitTest extends CamelBlueprintTestSupport { @@ -39,7 +38,7 @@ public class BlueprintPropertiesLocationElementImplicitTest extends CamelBluepri PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class); assertNotNull("Properties component not defined", pc); - List<PropertiesLocation> locations = pc.getLocations(); + List<String> locations = pc.getLocations(); assertNotNull(locations); assertEquals("Properties locations", 2, locations.size()); diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java index a681f7f..d4663a6 100644 --- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java +++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java @@ -20,7 +20,6 @@ import java.util.List; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.properties.PropertiesComponent; -import org.apache.camel.component.properties.PropertiesLocation; import org.junit.Test; public class BlueprintPropertiesLocationElementOptionalTest extends CamelBlueprintTestSupport { @@ -39,7 +38,7 @@ public class BlueprintPropertiesLocationElementOptionalTest extends CamelBluepri PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class); assertNotNull("Properties component not defined", pc); - List<PropertiesLocation> locations = pc.getLocations(); + List<String> locations = pc.getLocations(); assertNotNull(locations); assertEquals("Properties locations", 3, locations.size()); diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java index 9575e90..21ba5ff 100644 --- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java +++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java @@ -20,7 +20,6 @@ import java.util.List; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.properties.PropertiesComponent; -import org.apache.camel.component.properties.PropertiesLocation; import org.junit.Test; public class BlueprintPropertiesLocationElementTest extends CamelBlueprintTestSupport { @@ -39,7 +38,7 @@ public class BlueprintPropertiesLocationElementTest extends CamelBlueprintTestSu PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class); assertNotNull("Properties component not defined", pc); - List<PropertiesLocation> locations = pc.getLocations(); + List<String> locations = pc.getLocations(); assertNotNull(locations); assertEquals("Properties locations", 3, locations.size());