mx4j/src/core/javax/management/modelmbean RequiredModelMBean.java,1.13,1.14

Simone Bordet <[email protected]>
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19878/src/core/javax/management/modelmbean

Modified Files:
	RequiredModelMBean.java 
Log Message:
+ Cleanup
+ Fix for bug #920494: setManagedResource could not be invoked even if present in the ModelMBeanInfo

Index: RequiredModelMBean.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean/RequiredModelMBean.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** RequiredModelMBean.java	22 Oct 2003 23:21:44 -0000	1.13
--- RequiredModelMBean.java	22 Mar 2004 13:44:52 -0000	1.14
***************
*** 9,58 ****
  package javax.management.modelmbean;
  
  import java.util.Date;
  import java.util.Iterator;
! import java.lang.reflect.Method;
! import java.lang.reflect.InvocationTargetException;
! 
! import javax.management.MBeanException;
! import javax.management.RuntimeOperationsException;
! import javax.management.InstanceNotFoundException;
[...2381 lines suppressed...]
!       else if (declared == short.class && parameter == Short.class)
!          assignable = true;
!       else if (declared == int.class && parameter == Integer.class)
!          assignable = true;
!       else if (declared == long.class && parameter == Long.class)
!          assignable = true;
!       else if (declared == float.class && parameter == Float.class)
!          assignable = true;
!       else if (declared == double.class && parameter == Double.class)
!          assignable = true;
!       else
!          assignable = declared.isAssignableFrom(parameter);
! 
!       if (!assignable)
!       {
!          if (logger.isEnabledFor(Logger.TRACE)) logger.trace("Parameter value's class and attribute's declared return class are not assignable");
!          throw new MBeanException(new InvalidAttributeValueException("Returned type and declared type are not assignable"));
!       }
!    }
  }



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.