You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander Simbirtsev (JIRA)" <ji...@apache.org> on 2006/12/14 16:55:21 UTC

[jira] Created: (HARMONY-2716) [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException

[classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException
---------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2716
                 URL: http://issues.apache.org/jira/browse/HARMONY-2716
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Alexander Simbirtsev


Harmony throws unspecified ClassCastException for BasicSpinnerUI.installNextButtonListeners(Component c) and for BasicSpinnerUI.installPreviousButtonListeners(Component c) when passed in parameter is not JButton
while RI works silently for this case.

Use the following code to reproduce:

import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.plaf.basic.BasicSpinnerUI;

import junit.framework.TestCase;

public class Test extends TestCase {
    private static JLabel c = new JLabel();

    public void testcase1() { 
        BSUI localBasicSpinnerUI = new BSUI();
        try {
            localBasicSpinnerUI.installNextButtonListeners(c);
        } catch (ClassCastException unexpectedException) { 
            fail("ClassCastException thrown");
        }
    }

    public void testcase2() { 
        BSUI localBasicSpinnerUI = new BSUI();
        try {
            localBasicSpinnerUI.installPreviousButtonListeners(c);
        } catch (ClassCastException unexpectedException) { 
            fail("ClassCastException thrown");
        }
    }
}

class BSUI extends BasicSpinnerUI {
    public void installNextButtonListeners(Component c){
        super.installNextButtonListeners(c);
    }

    public void installPreviousButtonListeners(Component c){
        super.installPreviousButtonListeners(c);
    }
}

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

        

[jira] Updated: (HARMONY-2716) [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException

Posted by "Alexander Simbirtsev (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2716?page=all ]

Alexander Simbirtsev updated HARMONY-2716:
------------------------------------------

    Attachment: BasicSpinnerUI-patch.txt

Here's the proposed fix

> [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2716
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2716
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>         Attachments: BasicSpinnerUI-patch.txt
>
>
> Harmony throws unspecified ClassCastException for BasicSpinnerUI.installNextButtonListeners(Component c) and for BasicSpinnerUI.installPreviousButtonListeners(Component c) when passed in parameter is not JButton
> while RI works silently for this case.
> Use the following code to reproduce:
> import java.awt.Component;
> import javax.swing.JLabel;
> import javax.swing.plaf.basic.BasicSpinnerUI;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     private static JLabel c = new JLabel();
>     public void testcase1() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installNextButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
>     public void testcase2() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installPreviousButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
> }
> class BSUI extends BasicSpinnerUI {
>     public void installNextButtonListeners(Component c){
>         super.installNextButtonListeners(c);
>     }
>     public void installPreviousButtonListeners(Component c){
>         super.installPreviousButtonListeners(c);
>     }
> }

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

        

[jira] Closed: (HARMONY-2716) [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hindess closed HARMONY-2716.
---------------------------------

    Resolution: Fixed
      Assignee: Mark Hindess

> [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2716
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2716
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>         Assigned To: Mark Hindess
>         Attachments: BasicSpinnerUI-patch.txt, H2716-BasicSpinnerUITest.patch
>
>
> Harmony throws unspecified ClassCastException for BasicSpinnerUI.installNextButtonListeners(Component c) and for BasicSpinnerUI.installPreviousButtonListeners(Component c) when passed in parameter is not JButton
> while RI works silently for this case.
> Use the following code to reproduce:
> import java.awt.Component;
> import javax.swing.JLabel;
> import javax.swing.plaf.basic.BasicSpinnerUI;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     private static JLabel c = new JLabel();
>     public void testcase1() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installNextButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
>     public void testcase2() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installPreviousButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
> }
> class BSUI extends BasicSpinnerUI {
>     public void installNextButtonListeners(Component c){
>         super.installNextButtonListeners(c);
>     }
>     public void installPreviousButtonListeners(Component c){
>         super.installPreviousButtonListeners(c);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2716) [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2716?page=all ]

Dmitry Irlyanov updated HARMONY-2716:
-------------------------------------

    Attachment: H2716-BasicSpinnerUITest.patch

Regression test addition

> [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2716
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2716
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>         Attachments: BasicSpinnerUI-patch.txt, H2716-BasicSpinnerUITest.patch
>
>
> Harmony throws unspecified ClassCastException for BasicSpinnerUI.installNextButtonListeners(Component c) and for BasicSpinnerUI.installPreviousButtonListeners(Component c) when passed in parameter is not JButton
> while RI works silently for this case.
> Use the following code to reproduce:
> import java.awt.Component;
> import javax.swing.JLabel;
> import javax.swing.plaf.basic.BasicSpinnerUI;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     private static JLabel c = new JLabel();
>     public void testcase1() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installNextButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
>     public void testcase2() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installPreviousButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
> }
> class BSUI extends BasicSpinnerUI {
>     public void installNextButtonListeners(Component c){
>         super.installNextButtonListeners(c);
>     }
>     public void installPreviousButtonListeners(Component c){
>         super.installPreviousButtonListeners(c);
>     }
> }

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

        

[jira] Commented: (HARMONY-2716) [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470946 ] 

Alexei Zakharov commented on HARMONY-2716:
------------------------------------------

Since Mark has applied the pathches already I think we may close this JIRA. The failure is not reproducible on the current Harmony snapshot. 

> [classlib][swing] javax.swing.plaf.basic.BasicSpinnerUI.installNext/PreviousButtonListeners(Component c) throw unspecified ClassCastException
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2716
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2716
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>         Attachments: BasicSpinnerUI-patch.txt, H2716-BasicSpinnerUITest.patch
>
>
> Harmony throws unspecified ClassCastException for BasicSpinnerUI.installNextButtonListeners(Component c) and for BasicSpinnerUI.installPreviousButtonListeners(Component c) when passed in parameter is not JButton
> while RI works silently for this case.
> Use the following code to reproduce:
> import java.awt.Component;
> import javax.swing.JLabel;
> import javax.swing.plaf.basic.BasicSpinnerUI;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     private static JLabel c = new JLabel();
>     public void testcase1() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installNextButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
>     public void testcase2() { 
>         BSUI localBasicSpinnerUI = new BSUI();
>         try {
>             localBasicSpinnerUI.installPreviousButtonListeners(c);
>         } catch (ClassCastException unexpectedException) { 
>             fail("ClassCastException thrown");
>         }
>     }
> }
> class BSUI extends BasicSpinnerUI {
>     public void installNextButtonListeners(Component c){
>         super.installNextButtonListeners(c);
>     }
>     public void installPreviousButtonListeners(Component c){
>         super.installPreviousButtonListeners(c);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.