[ mx4j-Bugs-1836204 ] In aix platform, A TCK case can't pass.

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #1836204, was opened at 2007-11-22 03:40
Message generated for change (Comment added) made by simonebordet
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1836204&group_id=47745

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: JMX implementation
Group: Release 3.0.1
>Status: Closed
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: bfang (bfang)
>Assigned to: Simone Bordet (simonebordet)
Summary: In aix platform, A TCK case can't pass.

Initial Comment:
Description:
The TCK case is com/sun/ts/tests/jmx/api/javax/management/openmbean/ArrayTypeTest/ArrayTypeTest.java#testIsValue_from_standalone and it only failed in AIX platform.

Analysis:
The reason to casue the case failed is that in javax.management.openmbean.ArrayType.java of mx4j, the funciton  
public boolean isValue(Object object)
{
     if (object == null || !object.getClass().isArray())
      {
	      return false;
      }

      if (elementType instanceof SimpleType)
      {
	      return getClassName().equals(object.getClass().getName());
      }

      if (elementType instanceof TabularType || elementType instanceof CompositeType)
      {

	     try
         {
	         Class elementClass = Thread.currentThread().getContextClassLoader().loadClass(getClassName());
            
	         if (elementClass.isAssignableFrom(object.getClass()))
            {
                 return checkElements((Object[]) object, dimension);
            }
         }
         catch (ClassNotFoundException x)
         {
             return false;
         }
      }
      return false;
}

when without -Xdebug to JVM,  "Class elementClass = Thread.currentThread().getContextClassLoader().loadClass(getClassName())" will throw ClassNotFoundException. The return value of Thread.currentThread().getContextClassLoader() is sun.misc.Launcher$AppClassLoader and the value of getClassName() is [Ljavax.management.openmbean.CompositeData;
the object  parameter is an instance of  javax.management.openmbean.CompositeDataSupport.

when with -Xdebug to JVM,the value is same but no exception.


----------------------------------------------------------------------

>Comment By: Simone Bordet (simonebordet)
Date: 2007-12-01 21:08

Message:
Logged In: YES 
user_id=1170988
Originator: NO

>From your description of the bug, it seems that the differentiator is
having or not the -Xdebug option on the IBM JVM.
I fail to see how this can be an MX4J bug.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1836204&group_id=47745

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
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.