geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r952716 - in /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean: GBeanInfoBuilder.java annotation/AnnotationGBeanInfoBuilder.java annotation/ParamReference.java annotation/Reference.java
Date Tue, 08 Jun 2010 16:15:11 GMT
Author: djencks
Date: Tue Jun  8 16:15:11 2010
New Revision: 952716

URL: http://svn.apache.org/viewvc?rev=952716&view=rev
Log:
GERONIMO-5374 make defaults for @ParameterReference and @Reference work the same as GBeanInfoBuilder

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/AnnotationGBeanInfoBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/ParamReference.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/Reference.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java?rev=952716&r1=952715&r2=952716&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
Tue Jun  8 16:15:11 2010
@@ -473,8 +473,8 @@ public class GBeanInfoBuilder {
 
         // build the reference infos now that we know the constructor types
         Set referenceInfos = new HashSet();
-        for (Iterator iterator = references.entrySet().iterator(); iterator.hasNext();) {
-            Map.Entry entry = (Map.Entry) iterator.next();
+        for (Object o : references.entrySet()) {
+            Map.Entry entry = (Map.Entry) o;
             String referenceName = (String) entry.getKey();
             RefInfo refInfo = (RefInfo) entry.getValue();
             String referenceType = refInfo.getJavaType();

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/AnnotationGBeanInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/AnnotationGBeanInfoBuilder.java?rev=952716&r1=952715&r2=952716&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/AnnotationGBeanInfoBuilder.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/AnnotationGBeanInfoBuilder.java
Tue Jun  8 16:15:11 2010
@@ -144,6 +144,9 @@ public class AnnotationGBeanInfoBuilder 
                     String name = reference.name();
                     Class referenceType = getGenericActualType(genericTypes[index], parameterType);
                     String namingType = reference.namingType();
+                    if (namingType.equals("")) {
+                        namingType = null;
+                    }
                     infoBuilder.addReference(name, referenceType, namingType);
                     cstrNames[index] = name;
                     annotationFound = true;
@@ -199,11 +202,15 @@ public class AnnotationGBeanInfoBuilder 
             Class type = method.getParameterTypes()[0];
             Class referenceType = getGenericActualType(method.getGenericParameterTypes()[0],
type);
             String name = getName(method);
-            GReferenceInfo referenceInfo = new GReferenceInfo(name, 
+            String namingType = reference.namingType();
+            if (namingType.equals("")) {
+                namingType = null;
+            }
+            GReferenceInfo referenceInfo = new GReferenceInfo(name,
                 referenceType.getName(), 
                 type.getName(), 
                 method.getName(), 
-                reference.namingType());
+                namingType);
             infoBuilder.addReference(referenceInfo);
         }
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/ParamReference.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/ParamReference.java?rev=952716&r1=952715&r2=952716&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/ParamReference.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/ParamReference.java
Tue Jun  8 16:15:11 2010
@@ -36,5 +36,5 @@ import java.lang.annotation.Target;
 public @interface ParamReference {
     String name();
     
-    String namingType() default "GBean";
+    String namingType() default "";
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/Reference.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/Reference.java?rev=952716&r1=952715&r2=952716&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/Reference.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/annotation/Reference.java
Tue Jun  8 16:15:11 2010
@@ -34,5 +34,5 @@ import java.lang.annotation.Target;
 @Retention(value = RUNTIME)
 @Target(value = {METHOD})
 public @interface Reference {
-    String namingType() default "GBeanInfo";
+    String namingType() default "";
 }



Mime
View raw message