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 05:20:07 UTC
[jira] Created: (HARMONY-6218) [classlib][lang-management]
java.lang.management.MemoryUsage.from(CompositeData cd) should throw
IlegalArgumentException but not NullPointerException
[classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-6218
URL: https://issues.apache.org/jira/browse/HARMONY-6218
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 it while HARMONY fails and throws a java.lang.NullPointerException.
According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException.
Attribute Name Type
init java.lang.Long
used java.lang.Long
committed java.lang.Long
max java.lang.Long
[1] Test Case:
public void test_from() throws Exception {
String[] names = { "init", "used", "committed" };
Object[] values = { null, null, null };
OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG };
CompositeType compositeType = getCompositeType(names, types);
CompositeData data = new CompositeDataSupport(compositeType, names, values);
try {
MemoryUsage.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] Assigned: (HARMONY-6218) [classlib][lang-management]
java.lang.management.MemoryUsage.from(CompositeData cd) should throw
IlegalArgumentException but not NullPointerException
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-6218:
------------------------------------
Assignee: Tim Ellison
> [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6218
> URL: https://issues.apache.org/jira/browse/HARMONY-6218
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Attachments: HARMONY-6218.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY fails and throws a java.lang.NullPointerException.
> According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException.
> Attribute Name Type
> init java.lang.Long
> used java.lang.Long
> committed java.lang.Long
> max java.lang.Long
> [1] Test Case:
> public void test_from() throws Exception {
> String[] names = { "init", "used", "committed" };
> Object[] values = { null, null, null };
> OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG };
> CompositeType compositeType = getCompositeType(names, types);
> CompositeData data = new CompositeDataSupport(compositeType, names, values);
> try {
> MemoryUsage.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-6218) [classlib][lang-management]
java.lang.management.MemoryUsage.from(CompositeData cd) should throw
IlegalArgumentException but not NullPointerException
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6218.
----------------------------------
Resolution: Fixed
Fix Version/s: 5.0M11
Thanks Kevin,
Patch applied to LANG-MANAGEMENT module at repo revision r785152.
Please check it was applied as you expected.
> [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6218
> URL: https://issues.apache.org/jira/browse/HARMONY-6218
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M11
>
> Attachments: HARMONY-6218.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY fails and throws a java.lang.NullPointerException.
> According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException.
> Attribute Name Type
> init java.lang.Long
> used java.lang.Long
> committed java.lang.Long
> max java.lang.Long
> [1] Test Case:
> public void test_from() throws Exception {
> String[] names = { "init", "used", "committed" };
> Object[] values = { null, null, null };
> OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG };
> CompositeType compositeType = getCompositeType(names, types);
> CompositeData data = new CompositeDataSupport(compositeType, names, values);
> try {
> MemoryUsage.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-6218) [classlib][lang-management]
java.lang.management.MemoryUsage.from(CompositeData cd) should throw
IlegalArgumentException but not NullPointerException
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6218:
--------------------------------
Attachment: HARMONY-6218.diff
Would you please help to try it?
> [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6218
> URL: https://issues.apache.org/jira/browse/HARMONY-6218
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Fix For: 5.0M10
>
> Attachments: HARMONY-6218.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY fails and throws a java.lang.NullPointerException.
> According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException.
> Attribute Name Type
> init java.lang.Long
> used java.lang.Long
> committed java.lang.Long
> max java.lang.Long
> [1] Test Case:
> public void test_from() throws Exception {
> String[] names = { "init", "used", "committed" };
> Object[] values = { null, null, null };
> OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG };
> CompositeType compositeType = getCompositeType(names, types);
> CompositeData data = new CompositeDataSupport(compositeType, names, values);
> try {
> MemoryUsage.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] Closed: (HARMONY-6218) [classlib][lang-management]
java.lang.management.MemoryUsage.from(CompositeData cd) should throw
IlegalArgumentException but not NullPointerException
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou closed HARMONY-6218.
-------------------------------
Thanks, Tim.
> [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6218
> URL: https://issues.apache.org/jira/browse/HARMONY-6218
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M11
>
> Attachments: HARMONY-6218.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY fails and throws a java.lang.NullPointerException.
> According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException.
> Attribute Name Type
> init java.lang.Long
> used java.lang.Long
> committed java.lang.Long
> max java.lang.Long
> [1] Test Case:
> public void test_from() throws Exception {
> String[] names = { "init", "used", "committed" };
> Object[] values = { null, null, null };
> OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG };
> CompositeType compositeType = getCompositeType(names, types);
> CompositeData data = new CompositeDataSupport(compositeType, names, values);
> try {
> MemoryUsage.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-6218) [classlib][lang-management]
java.lang.management.MemoryUsage.from(CompositeData cd) should throw
IlegalArgumentException but not NullPointerException
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer updated HARMONY-6218:
----------------------------------
Fix Version/s: (was: 5.0M10)
> [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6218
> URL: https://issues.apache.org/jira/browse/HARMONY-6218
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Attachments: HARMONY-6218.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY fails and throws a java.lang.NullPointerException.
> According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException.
> Attribute Name Type
> init java.lang.Long
> used java.lang.Long
> committed java.lang.Long
> max java.lang.Long
> [1] Test Case:
> public void test_from() throws Exception {
> String[] names = { "init", "used", "committed" };
> Object[] values = { null, null, null };
> OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG };
> CompositeType compositeType = getCompositeType(names, types);
> CompositeData data = new CompositeDataSupport(compositeType, names, values);
> try {
> MemoryUsage.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.