You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/01/15 08:54:27 UTC

[jira] Closed: (HARMONY-2441) [classlib][awt] java.awt.dnd.DragSource.getListeners() does not throw ClassCastException or IAE

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

Alexei Zakharov closed HARMONY-2441.
------------------------------------

    Resolution: Invalid

Closing this as invalid

> [classlib][awt] java.awt.dnd.DragSource.getListeners() does not throw ClassCastException or IAE
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2441
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2441
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Dolgov
>         Assigned To: Alexei Zakharov
>            Priority: Minor
>
> Test case:
> --------------
> import java.awt.dnd.DragSource;
> import junit.framework.TestCase;
> public class TheTest extends TestCase {
>     public static void main(String args[]) {
>         junit.textui.TestRunner.run(TheTest.class);
>     }
>     public void testcase1() {
>         DragSource ds = new DragSource();
>         try {
>             ds.getListeners(Class.class);
>             fail("ClassCastException expected");
>         } catch (ClassCastException e) {
>         }
>     }         
>     
>     public void testcase2() {                                           
>         DragSource ds = new DragSource();
>         try {
>             ds.getListeners(Void.TYPE);
>             fail("IllegalArgumentException expected");
>         } catch (IllegalArgumentException e) {
>         }
>     }         
> }
> RI output:
> ----------------
> ..
> Time: 1,811
> OK (2 tests)
> Harmony output:
> -----------------
> .F.F
> Time: 0.59
> There were 2 failures:
> 1) testcase1(TheTest)junit.framework.AssertionFailedError: ClassCastException expected
> 	at TheTest.testcase1(TheTest.java:15)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:8)
> 2) testcase2(TheTest)junit.framework.AssertionFailedError: IllegalArgumentException expected
> 	at TheTest.testcase2(TheTest.java:24)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:8)
> FAILURES!!!
> Tests run: 2,  Failures: 2,  Errors: 0

-- 
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