Kevin,
Is there any reason for Harmony to behave differently from RI?

> HY fails to throw NullPointException while RI works smoothly
Just trying to check my understanding. Does RI smoothly throw NPE?

Thanks.

On Mon, Apr 13, 2009 at 12:47 PM, Kevin Zhou <[email protected]> wrote:
>> In addition to the above defect, the constructors of MemoryNotificationInfo
>> class behave differently from RI.
>> For instance, given another test case [1], HY fails to throw
>> NullPointException while RI works smoothly.
>>
>> For test_Constructor_NullPoolName_NullUsage test scenario:
>> RI throws NPE as: java.lang.NullPointerException: Null poolName
>>
>> For test_Constructor_NullUsage test scenario:
>> RI throws NPE as: java.lang.NullPointerException: Null usage
>>
>> [1] Test Case:
>> public void test_Constructor_NullPoolName_NullUsage() {
>>    try {
>>        new MemoryNotificationInfo((String) null, (MemoryUsage) null,
>>            -4294901761L);
>>        fail("should throw NullPointerException");
>>    } catch (NullPointerException e) {
>>        // Expected
>>    }
>> }
>>
>> public void test_Constructor_NullUsage() {
>>    try {
>>        new MemoryNotificationInfo("poolName", (MemoryUsage) null,
>>            -4294901761L);
>>        fail("should throw NullPointerException");
>>    } catch (NullPointerException e) {
>>        // Expected
>>    }
>> }
>>
> Shall we follow RI from this behavior?
>



-- 
With best regards / с наилучшими пожеланиями,
Alexei Fedotov / Алексей Федотов,
http://www.telecom-express.ru/
http://people.apache.org/~aaf/
http://harmony.apache.org/
http://code.google.com/p/openmeetings/

Reply via email to