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/gbean/jmx GBeanMBean.java
Date Thu, 12 Feb 2004 17:21:16 GMT
jboynes     2004/02/12 09:21:16

  Modified:    modules/kernel/src/java/org/apache/geronimo/gbean/jmx
                        GBeanMBean.java
  Log:
  log warning if constructor signatures do not match
  
  Revision  Changes    Path
  1.7       +8 -2      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/GBeanMBean.java
  
  Index: GBeanMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/GBeanMBean.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- GBeanMBean.java	25 Jan 2004 21:07:04 -0000	1.6
  +++ GBeanMBean.java	12 Feb 2004 17:21:16 -0000	1.7
  @@ -56,6 +56,7 @@
   package org.apache.geronimo.gbean.jmx;
   
   import java.lang.reflect.Constructor;
  +import java.lang.reflect.InvocationTargetException;
   import java.util.Collections;
   import java.util.HashMap;
   import java.util.HashSet;
  @@ -284,7 +285,12 @@
                       + ". Constructor parameter " + i + " should be " + assertedType.getName()
                       + " but is " + parameters[i].getClass().getName();
           }
  -        target = constructor.newInstance(parameters);
  +        try {
  +            target = constructor.newInstance(parameters);
  +        } catch (IllegalArgumentException e) {
  +            log.warn("Constructor mismatch for "+returnValue, e);
  +            throw e;
  +        }
   
           // bring all of the attributes online
           for (Iterator iterator = attributeMap.values().iterator(); iterator.hasNext();)
{
  
  
  

Mime
View raw message