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/13 12:36:24 UTC

[jira] Created: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

[classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI
----------------------------------------------------------------------------

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


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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Alexei Zakharov updated HARMONY-2663:
-------------------------------------

    Patch Info: [Patch Available]

> [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.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Alexei Zakharov closed HARMONY-2663.
------------------------------------


verified by Vasily

> [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
>         Assigned To: Alexei Zakharov
>         Attachments: Harmony-2663-1-Test.patch, Harmony-2663-1-Test.patch, Harmony-2663-1.patch, Harmony-2663-2-Test.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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

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

I'll look into this issue.


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

        

[jira] Commented: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

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

Added fix and test patches for second issue (createMenuListener).

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

        

[jira] Updated: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Vasily Zakharov updated HARMONY-2663:
-------------------------------------

    Attachment: Harmony-2663-2-Test.patch

Alexei, I've updated the Harmony-2663-2-Test.patch, it fixes the problem. Thank you.


> [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
>         Assigned To: Alexei Zakharov
>         Attachments: Harmony-2663-1-Test.patch, Harmony-2663-1-Test.patch, Harmony-2663-1.patch, Harmony-2663-2-Test.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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Vasily Zakharov updated HARMONY-2663:
-------------------------------------

    Attachment: Harmony-2663-1-Test.patch
                Harmony-2663-1.patch

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

        

[jira] Assigned: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Alexei Zakharov reassigned HARMONY-2663:
----------------------------------------

    Assignee: Alexei Zakharov

> [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
>         Assigned To: Alexei Zakharov
>         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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Alexei Zakharov commented on HARMONY-2663:
------------------------------------------

Vasily, after I applied your patch the test BasicMenuUI.testInstallUninstallListeners started to fail. I use DRLVM on Windows.

> [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
>         Assigned To: Alexei Zakharov
>         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.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Alexei Zakharov resolved HARMONY-2663.
--------------------------------------

    Resolution: Fixed

New patch works good. Thanks Vasiliy. Was applied at the revision 502613. Please verify. 
BTW BasicMenuUITest.testInstallUninstallDefaults() currently fails on RI. Is it ok? Or it is a work to do? ;)

> [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
>         Assigned To: Alexei Zakharov
>         Attachments: Harmony-2663-1-Test.patch, Harmony-2663-1-Test.patch, Harmony-2663-1.patch, Harmony-2663-2-Test.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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

Vasily Zakharov updated HARMONY-2663:
-------------------------------------

    Attachment: Harmony-2663-2-Test.patch
                Harmony-2663-2.patch
                Harmony-2663-1-Test.patch

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

        

[jira] Commented: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] Commented: (HARMONY-2663) [classlib][swing] javax.swing.plaf.basic.BasicMenuUI is inconsistent with RI

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

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

Thanks Alexei, the patch is fine.

testInstallUninstallDefaults() fails on RI with or without this patch either. Enabling and verifying Swing tests is a huge issue, indeed.


> [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
>         Assigned To: Alexei Zakharov
>         Attachments: Harmony-2663-1-Test.patch, Harmony-2663-1-Test.patch, Harmony-2663-1.patch, Harmony-2663-2-Test.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.
-
You can reply to this email to add a comment to the issue online.