geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r911711 - /geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
Date Fri, 19 Feb 2010 06:25:16 GMT
Author: vamsic007
Date: Fri Feb 19 06:25:16 2010
New Revision: 911711

URL: http://svn.apache.org/viewvc?rev=911711&view=rev
Log:
Setup property injection in web artifact only if the runtime component has that property configured.

Modified:
    geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java

Modified: geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java?rev=911711&r1=911710&r2=911711&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
(original)
+++ geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
Fri Feb 19 06:25:16 2010
@@ -346,8 +346,15 @@
         
         // Process property injection points
         injectionPoints =  implementation.getPropertyInjectionPoints();
+        List<String> runtimeProperties = new ArrayList<String>();
+        for(ComponentProperty prop: thisComponent.getProperties()) {
+            runtimeProperties.add(prop.getName());
+        }
         for(Map.Entry<String, JavaElementImpl> entry : injectionPoints.entrySet())
{
             String propertyName = entry.getKey();
+            if(!runtimeProperties.contains(propertyName)) {
+                continue;
+            }
             JavaElementImpl target = entry.getValue();
             if(target.getElementType().equals(ElementType.FIELD)) {
                 Field field = (Field)target.getAnchor();



Mime
View raw message