harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6219) [classlib][lang-management] java.lang.management.ThreadInfo.from(CompositeData cd) should throw IlegalArgumentException when the threadName of the given CompositeData is null
Date Sun, 31 May 2009 08:14:07 GMT
[classlib][lang-management] java.lang.management.ThreadInfo.from(CompositeData cd) should throw
IlegalArgumentException when the threadName of the given CompositeData is null
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6219
                 URL: https://issues.apache.org/jira/browse/HARMONY-6219
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M9
            Reporter: Kevin Zhou
             Fix For: 5.0M10


Given a test case [1], RI passes this while HARMONY fails.

[1] Test Case:
public void test_from_NullThreadName() throws Exception {
        Object stackTraceElementData = createGoodStackTraceCompositeData();
        CompositeType stackTraceElementType = createGoodStackTraceElementCompositeType();
        String[] names = { "threadId", "threadName", "threadState",
                "suspended", "inNative", "blockedCount", "blockedTime",
                "waitedCount", "waitedTime", "lockName", "lockOwnerId",
                "lockOwnerName", "stackTrace" };
        Object[] values = { 1L, null, GOOD_THREAD_STATE.toString(),
                true, false, 1L, 500L, 1L, 1L, "lock", 2L, "lockOwner",
                stackTraceElementData };
        OpenType[] types = { SimpleType.LONG, SimpleType.STRING,
                SimpleType.STRING, SimpleType.BOOLEAN, SimpleType.BOOLEAN,
                SimpleType.LONG, SimpleType.LONG, SimpleType.LONG,
                SimpleType.LONG, SimpleType.STRING, SimpleType.LONG,
                SimpleType.STRING, new ArrayType(1, stackTraceElementType) };
        CompositeType compositeType = new CompositeType(ThreadInfo.class
                .getName(), ThreadInfo.class.getName(), names, names, types);
        CompositeData data = new CompositeDataSupport(compositeType, names,
                values);
        try {
            ThreadInfo.from(data);
            fail("should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // Expected
        }
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message