[ 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 02:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: bfang (bfang)
Assigned to: Nobody/Anonymous (nobody)
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.


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

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
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.