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:14:07 UTC
[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
[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.
[jira] Resolved: (HARMONY-6219) [classlib][lang-management]
java.lang.management.ThreadInfo.from(CompositeData cd) should throw
IlegalArgumentException when the threadName of the given CompositeData is
null
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou resolved HARMONY-6219.
---------------------------------
Resolution: Fixed
This issue has been resolved by patch applied at r932328, thanks
> [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
> 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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[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
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer updated HARMONY-6219:
----------------------------------
Fix Version/s: (was: 5.0M10)
> [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
> 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.
[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
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ 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.