You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/05/31 10:18:07 UTC

[jira] Updated: (HARMONY-6219) [classlib][lang-management] java.lang.management.ThreadInfo.from(CompositeData cd) should throw IlegalArgumentException when the threadName of the given CompositeData is null

     [ https://issues.apache.org/jira/browse/HARMONY-6219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-6219:
--------------------------------

    Attachment: HARMONY-6219.diff

Would you please help to try it?

> [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
>
>         Attachments: HARMONY-6219.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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.