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

[jira] Created: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

[classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
----------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2895
                 URL: http://issues.apache.org/jira/browse/HARMONY-2895
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
            Reporter: Ilya Okomin
            Priority: Minor


There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
Test case to reproduce, that passes on RI and fails on Harmony:
----------- test.java ----------------
import javax.swing.JFileChooser;
import javax.swing.plaf.basic.BasicFileChooserUI;

import junit.framework.TestCase;
import junit.textui.TestRunner;

public class test extends TestCase {

    public static void main(String args[]) {
        TestRunner.run(test.class);
    }

    public void testRun() {
        try {
            BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
            cb.getApproveButtonMnemonic(null);
            fail("NullPointerException expected");
        } catch (NullPointerException e) {
            // expected
        }
    }
}
----------------------------------------

I suppose this case can be treated as non-bug difference.
Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

-- 
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-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

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

Alexei Zakharov updated HARMONY-2895:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2895
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2895
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>            Priority: Minor
>         Attachments: Harmony-2895-BasicFileChooserUI.patch
>
>
> There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
> Test case to reproduce, that passes on RI and fails on Harmony:
> ----------- test.java ----------------
> import javax.swing.JFileChooser;
> import javax.swing.plaf.basic.BasicFileChooserUI;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
>             cb.getApproveButtonMnemonic(null);
>             fail("NullPointerException expected");
>         } catch (NullPointerException e) {
>             // expected
>         }
>     }
> }
> ----------------------------------------
> I suppose this case can be treated as non-bug difference.
> Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

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


[jira] Assigned: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

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

Alexey Petrenko reassigned HARMONY-2895:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2895
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2895
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>         Attachments: Harmony-2895-BasicFileChooserUI.patch, Harmony-2895-BasicFileChooserUITest.patch
>
>
> There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
> Test case to reproduce, that passes on RI and fails on Harmony:
> ----------- test.java ----------------
> import javax.swing.JFileChooser;
> import javax.swing.plaf.basic.BasicFileChooserUI;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
>             cb.getApproveButtonMnemonic(null);
>             fail("NullPointerException expected");
>         } catch (NullPointerException e) {
>             // expected
>         }
>     }
> }
> ----------------------------------------
> I suppose this case can be treated as non-bug difference.
> Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

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


[jira] Closed: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

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

Alexey Petrenko closed HARMONY-2895.
------------------------------------

    Resolution: Won't Fix

This issue was discussed on harmony dev [1]: +1 for non-bug difference from Ilya, +1 from me, -1 from Alexei.
Closed as non-bug diff as a result.

Can be reopened if some application will fail or other strong arguments will appear.

[1] http://mail-archives.apache.org/mod_mbox/harmony-dev/200703.mbox/%3cc3755b3a0703012339g63b9098ckee7a16a95fb74efd@mail.gmail.com%3e

> [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2895
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2895
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>         Attachments: Harmony-2895-BasicFileChooserUI.patch, Harmony-2895-BasicFileChooserUITest.patch
>
>
> There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
> Test case to reproduce, that passes on RI and fails on Harmony:
> ----------- test.java ----------------
> import javax.swing.JFileChooser;
> import javax.swing.plaf.basic.BasicFileChooserUI;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
>             cb.getApproveButtonMnemonic(null);
>             fail("NullPointerException expected");
>         } catch (NullPointerException e) {
>             // expected
>         }
>     }
> }
> ----------------------------------------
> I suppose this case can be treated as non-bug difference.
> Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

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


[jira] Updated: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

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

Sergey Krivenko updated HARMONY-2895:
-------------------------------------

    Attachment: Harmony-2895-BasicFileChooserUI.patch

Simply throwing NPE if JFileChooser is null for compatibility  

> [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2895
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2895
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>            Priority: Minor
>         Attachments: Harmony-2895-BasicFileChooserUI.patch
>
>
> There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
> Test case to reproduce, that passes on RI and fails on Harmony:
> ----------- test.java ----------------
> import javax.swing.JFileChooser;
> import javax.swing.plaf.basic.BasicFileChooserUI;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
>             cb.getApproveButtonMnemonic(null);
>             fail("NullPointerException expected");
>         } catch (NullPointerException e) {
>             // expected
>         }
>     }
> }
> ----------------------------------------
> I suppose this case can be treated as non-bug difference.
> Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

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


[jira] Updated: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

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

Sergey Krivenko updated HARMONY-2895:
-------------------------------------

    Attachment: Harmony-2895-BasicFileChooserUITest.patch

BasicFileChooserUITest is updated

> [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2895
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2895
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>            Priority: Minor
>         Attachments: Harmony-2895-BasicFileChooserUI.patch, Harmony-2895-BasicFileChooserUITest.patch
>
>
> There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
> Test case to reproduce, that passes on RI and fails on Harmony:
> ----------- test.java ----------------
> import javax.swing.JFileChooser;
> import javax.swing.plaf.basic.BasicFileChooserUI;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
>             cb.getApproveButtonMnemonic(null);
>             fail("NullPointerException expected");
>         } catch (NullPointerException e) {
>             // expected
>         }
>     }
> }
> ----------------------------------------
> I suppose this case can be treated as non-bug difference.
> Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

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


[jira] Commented: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE

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

Alexey Petrenko commented on HARMONY-2895:
------------------------------------------

I would agree with Ilya and vote for closing this issue as non-bug difference because FileChooserUI methods does not usualy use FileChooser which is passed as method parameter. So it looks illogical to throw an exception in few methods and do not throw in others.


> [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2895
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2895
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>         Attachments: Harmony-2895-BasicFileChooserUI.patch, Harmony-2895-BasicFileChooserUITest.patch
>
>
> There is no mention of any exception in the specification. But RI throws unspecified NPE for getApproveButtonMnemonic(null) while Harmony does not.
> Test case to reproduce, that passes on RI and fails on Harmony:
> ----------- test.java ----------------
> import javax.swing.JFileChooser;
> import javax.swing.plaf.basic.BasicFileChooserUI;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
>             cb.getApproveButtonMnemonic(null);
>             fail("NullPointerException expected");
>         } catch (NullPointerException e) {
>             // expected
>         }
>     }
> }
> ----------------------------------------
> I suppose this case can be treated as non-bug difference.
> Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser) null).

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