harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI
Date Tue, 16 Jan 2007 00:53:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465018
] 

Vasily Zakharov commented on HARMONY-2663:
------------------------------------------

Added fix patch and updated test patch for first issue (getMaximumSize).


> [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2663
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2663
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>         Attachments: Harmony-2663-1-Test.patch, Harmony-2663-1-Test.patch, Harmony-2663-1.patch,
Harmony-2663-2-Test.patch, Harmony-2663-2.patch
>
>
> 1) Harmony throws ClassCastException for getMaximumSize(new JOptionPane()) while RI throws
NPE.
> 2) Harmony returns non-null value for createMenuListener() method while RI return null
> Use the following code to reproduce:
> import javax.swing.JComponent;
> import javax.swing.JMenu;
> import javax.swing.JOptionPane;
> import javax.swing.event.MenuListener;
> import javax.swing.plaf.basic.BasicMenuUI;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     public void testcase1() {                                    
>         testBasicMenuUI bm = new testBasicMenuUI();         
>         assertNull(bm.createMenuListener(new JMenu()));
>     }
>     
>     public void testcase2() {                                    
>         try {   
>            BasicMenuUI bm = new BasicMenuUI();
>            System.err.println(bm.getMaximumSize(new JOptionPane()));
>         } catch (ClassCastException e) { 
>             fail("ClassCastException thrown");
>         } catch (NullPointerException e) {
>             // expected
>         }     
>     }
> }                      
> class testBasicMenuUI extends BasicMenuUI {
>      public MenuListener createMenuListener(JComponent l)  {
>          return super.createMenuListener(l);
>      }     
> } 

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

        

Mime
View raw message