aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1796642 - in /aries/trunk/blueprint: blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java itests/blueprint-itests/pom.xml
Date Mon, 29 May 2017 15:04:13 GMT
Author: gnodet
Date: Mon May 29 15:04:13 2017
New Revision: 1796642

URL: http://svn.apache.org/viewvc?rev=1796642&view=rev
Log:
[ARIES-1727] Unable to create blueprint spring container

Modified:
    aries/trunk/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
    aries/trunk/blueprint/itests/blueprint-itests/pom.xml

Modified: aries/trunk/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java?rev=1796642&r1=1796641&r2=1796642&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
(original)
+++ aries/trunk/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
Mon May 29 15:04:13 2017
@@ -227,8 +227,19 @@ public class BlueprintNamespaceHandler i
     @SuppressWarnings("unchecked")
     private <T> T getPassThrough(ParserContext parserContext, String name, Class<T>
clazz) {
         Metadata metadata = parserContext.getComponentDefinitionRegistry().getComponentDefinition(name);
+        if (metadata instanceof BeanMetadata) {
+            BeanMetadata bm = (BeanMetadata) metadata;
+            if (bm.getFactoryComponent() instanceof PassThroughMetadata
+                    && "getObject".equals(bm.getFactoryMethod())) {
+                metadata = bm.getFactoryComponent();
+            }
+        }
         if (metadata instanceof PassThroughMetadata) {
-            return (T) ((PassThroughMetadata) metadata).getObject();
+            Object o = ((PassThroughMetadata) metadata).getObject();
+            if (o instanceof Holder) {
+                o = ((Holder) o).getObject();
+            }
+            return (T) o;
         } else {
             return null;
         }

Modified: aries/trunk/blueprint/itests/blueprint-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/itests/blueprint-itests/pom.xml?rev=1796642&r1=1796641&r2=1796642&view=diff
==============================================================================
--- aries/trunk/blueprint/itests/blueprint-itests/pom.xml (original)
+++ aries/trunk/blueprint/itests/blueprint-itests/pom.xml Mon May 29 15:04:13 2017
@@ -56,7 +56,7 @@
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.core</artifactId>
-            <version>1.8.1-SNAPSHOT</version>
+            <version>1.8.2-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>



Mime
View raw message