You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/12/12 12:00:22 UTC

[jira] Updated: (HARMONY-2628) [classlib][swing] JSplitPane.add(null) does not throw unspecified NPE

     [ http://issues.apache.org/jira/browse/HARMONY-2628?page=all ]

Denis Kishenko updated HARMONY-2628:
------------------------------------

    Description: 
javax.swing.JSplitPane.add(null) does not throw unspecified NPE while RI does.
Trere is no mention of any exception in the specification.
Compatibility issue.

Test for reproducing:
import junit.framework.TestCase;
import javax.swing.*;
import java.awt.Component;

public class Test extends TestCase {       
    public void testcase1() {
        JSplitPane s = new JSplitPane();
        try {
            s.add(null);
            fail("NPE should be thrown");
        } catch ( NullPointerException e) { 
          //expected
        }
    }                
}

Output on Sun 1.5
=================
.
Time: 0.328

OK (1 test)

Output on Harmony:
==================
.F
Time: 0.921
There was 1 failure:
1) testcase1(Test)junit.framework.AssertionFailedError: NPE should be thrown
        at Test.testcase1(Test.java:11)
        at java.lang.reflect.VMReflection.invokeMethod(Native Method)

FAILURES!!!
Tests run: 1,  Failures: 1,  Errors: 0


  was:
javax.swing.JSplitPane.add(null) does not throw unspecified NPE while RI does.
Trere is no mention of any exception in the specification.
Compatibility issue.

Test for reproducing:
import junit.framework.TestCase;
import javax.swing.*;
import java.awt.Component;

public class Test extends TestCase {       
    public void testcase1() {
        JSplitPane s = new JSplitPane();
        Component cmp = null;
        try {
            s.add(cmp);
            fail("NPE should be thrown");
        } catch ( NullPointerException e) { 
          //expected
        }
    }                
}

Output on Sun 1.5
=================
.
Time: 0.328

OK (1 test)

Output on Harmony:
==================
.F
Time: 0.921
There was 1 failure:
1) testcase1(Test)junit.framework.AssertionFailedError: NPE should be thrown
        at Test.testcase1(Test.java:11)
        at java.lang.reflect.VMReflection.invokeMethod(Native Method)

FAILURES!!!
Tests run: 1,  Failures: 1,  Errors: 0



> [classlib][swing] JSplitPane.add(null) does not throw unspecified NPE
> ---------------------------------------------------------------------
>
>                 Key: HARMONY-2628
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2628
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> javax.swing.JSplitPane.add(null) does not throw unspecified NPE while RI does.
> Trere is no mention of any exception in the specification.
> Compatibility issue.
> Test for reproducing:
> import junit.framework.TestCase;
> import javax.swing.*;
> import java.awt.Component;
> public class Test extends TestCase {       
>     public void testcase1() {
>         JSplitPane s = new JSplitPane();
>         try {
>             s.add(null);
>             fail("NPE should be thrown");
>         } catch ( NullPointerException e) { 
>           //expected
>         }
>     }                
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.328
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 0.921
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: NPE should be thrown
>         at Test.testcase1(Test.java:11)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira