You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2012/05/24 17:45:39 UTC
svn commit: r1342303 - in /camel/branches/camel-2.9.x: ./
components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContextLookupHelper.java
Author: davsclaus
Date: Thu May 24 15:45:39 2012
New Revision: 1342303
URL: http://svn.apache.org/viewvc?rev=1342303&view=rev
Log:
Blueprint namespace should lookup default blueprint camelcontext if not explict configured in the namespace.
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContextLookupHelper.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1342301
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContextLookupHelper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContextLookupHelper.java?rev=1342303&r1=1342302&r2=1342303&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContextLookupHelper.java (original)
+++ camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContextLookupHelper.java Thu May 24 15:45:39 2012
@@ -39,19 +39,19 @@ public final class BlueprintCamelContext
* @return a set with the ids of the {@link BlueprintCamelContext}, never <tt>null</tt>, but can be empty set.
*/
public static Set<String> lookupBlueprintCamelContext(BlueprintContainer container) {
- Set<String> found = new LinkedHashSet<String>();
+ Set<String> ids = new LinkedHashSet<String>();
for (Object id : container.getComponentIds()) {
ComponentMetadata meta = container.getComponentMetadata(id.toString());
// must be extended meta, to see if its the blueprint camel context
if (meta instanceof ExtendedBeanMetadata) {
- ExtendedBeanMetadata emata = (ExtendedBeanMetadata) meta;
- if (emata.getRuntimeClass() != null && BlueprintCamelContext.class.getName().equals(emata.getRuntimeClass().getName())) {
+ Class<?> clazz = ((ExtendedBeanMetadata) meta).getRuntimeClass();
+ if (clazz != null && BlueprintCamelContext.class.isAssignableFrom(clazz)) {
// okay we found a BlueprintCamelContext
- found.add(emata.getId());
+ ids.add(meta.getId());
}
}
}
- return found;
+ return ids;
}
}