geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx InvokeMBean.java
Date Fri, 07 Nov 2003 18:06:03 GMT
jboynes     2003/11/07 10:06:02

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/jmx
                        InvokeMBean.java
  Log:
  Fix problem with accessing attributes
  
  Revision  Changes    Path
  1.2       +11 -2     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/InvokeMBean.java
  
  Index: InvokeMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/InvokeMBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InvokeMBean.java	7 Nov 2003 17:32:11 -0000	1.1
  +++ InvokeMBean.java	7 Nov 2003 18:06:02 -0000	1.2
  @@ -79,7 +79,6 @@
       private final int expectedArguments;
   
       public InvokeMBean(Method method, boolean isAttribute, boolean isGetter) {
  -        name = method.getName();
           this.isAttribute = isAttribute;
           this.isGetter = isGetter;
           this.expectedArguments = method.getParameterTypes().length;
  @@ -93,6 +92,16 @@
               }
           }
   
  +        if(isAttribute) {
  +            if(method.getName().startsWith("is")) {
  +                name = method.getName().substring(2);
  +            } else {
  +                name = method.getName().substring(3);
  +            }
  +        } else {
  +            name = method.getName();
  +        }
  +        
           // conver the parameters to a MBeanServer friendly string array
           Class[] parameters = method.getParameterTypes();
           argumentTypes = new String[parameters.length];
  
  
  

Mime
View raw message