geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean DynamicGBeanDelegate.java
Date Wed, 21 Jan 2004 19:45:14 GMT
djencks     2004/01/21 11:45:14

  Modified:    modules/kernel/src/java/org/apache/geronimo/gbean
                        DynamicGBeanDelegate.java
  Log:
  Umm, test cases are a good thing
  
  Revision  Changes    Path
  1.3       +4 -4      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/DynamicGBeanDelegate.java
  
  Index: DynamicGBeanDelegate.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/DynamicGBeanDelegate.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynamicGBeanDelegate.java	16 Jan 2004 23:55:54 -0000	1.2
  +++ DynamicGBeanDelegate.java	21 Jan 2004 19:45:14 -0000	1.3
  @@ -103,7 +103,7 @@
       }
   
       public void addGetter(String name, Object target, Method method) {
  -        if (method.getParameterTypes().length == 0 && method.getReturnType() !=
Void.TYPE) {
  +        if (!(method.getParameterTypes().length == 0 && method.getReturnType()
!= Void.TYPE)) {
               throw new IllegalArgumentException("Method must take no parameters and return
a value " + method);
           }
           getters.put(name, new Operation(target, method));
  @@ -117,10 +117,10 @@
       }
   
       public void addSetter(String name, Object target, Method method) {
  -        if (method.getParameterTypes().length == 1 && method.getReturnType() ==
Void.TYPE) {
  +        if (!(method.getParameterTypes().length == 1 && method.getReturnType()
== Void.TYPE)) {
               throw new IllegalArgumentException("Method must take one parameter and not
return anything " + method);
           }
  -        setters.put(method.getName().substring(3), new Operation(target, method));
  +        setters.put(name, new Operation(target, method));
       }
   
       public void addOperation(Object target, Method method) {
  
  
  

Mime
View raw message