You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/12/22 14:40:24 UTC
[jira] Created: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
[classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
----------------------------------------------------------------------------------------------
Key: HARMONY-2853
URL: http://issues.apache.org/jira/browse/HARMONY-2853
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey A. Ivanov
Priority: Minor
======= Code to Reproduce =======
import javax.swing.plaf.basic.BasicScrollBarUI;
public class Test {
private static class TestBasicScrollBarUI extends BasicScrollBarUI {
@Override
public void configureScrollBarColors() {
super.configureScrollBarColors();
}
}
public static void main(String[] args) {
TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
sbr.configureScrollBarColors();
}
}
======= end of code =======
Harmony works silently, but RI throws NPE:
java.lang.NullPointerException
at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
at Test.main(Test.java:13)
--
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-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko updated HARMONY-2853:
-------------------------------------
Patch Info: (was: [Patch Available])
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Sergey Krivenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Krivenko updated HARMONY-2853:
-------------------------------------
Attachment: Harmony-2853-BasicScrollBarUI.patch
Checking for nulls and throwing NPE for compatibility
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko resolved HARMONY-2853.
--------------------------------------
Resolution: Fixed
I've created a new patch and applied it.
Alexey, please verify.
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-2853:
-------------------------------------
Patch Info: [Patch Available]
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov closed HARMONY-2853.
-------------------------------------
Verified!
Thank you, Alexey. Your patch fixes the issue.
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko reassigned HARMONY-2853:
----------------------------------------
Assignee: Alexey Petrenko
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Sergey Krivenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Krivenko updated HARMONY-2853:
-------------------------------------
Attachment: Harmony-2853-BasicScrollBarUITest.patch
A patch for the test
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2853) [classlib][swing]
j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw
NPE
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481256 ]
Alexey Petrenko commented on HARMONY-2853:
------------------------------------------
Sergey,
your patch throws NPE in case of thumbColor or thumbDarkShadowColor and other colors are nulls.
I've modified the original test a little.
=== cut ===
public class Test {
private static class TestBasicScrollBarUI extends BasicScrollBarUI {
@Override
public void configureScrollBarColors() {
super.configureScrollBarColors();
}
}
public static void main(String[] args) {
TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
sbr.installUI(new JScrollBar()); // added string
sbr.configureScrollBarColors();
}
}
=== cut ===
And RI stops throwing NPE while Harmony with your patch still throws it. This means that RI throws NPE in case of scrollbar field is null but not thumbColor or thumbDarkShadowColor and other colors are nulls.
So your patch does not fix the original issue and introduces regression to Harmony code and it can not be applied.
Please be more careful with your patches.
Thanks in advance.
SY, Alexey
P.S. I'll create a new patch myself.
> [classlib][swing] j.s.plaf.basic.BasicScrollBarUI.configureScrollBarColors() doesn't throw NPE
> ----------------------------------------------------------------------------------------------
>
> Key: HARMONY-2853
> URL: https://issues.apache.org/jira/browse/HARMONY-2853
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: Harmony-2853-BasicScrollBarUI.patch, Harmony-2853-BasicScrollBarUITest.patch
>
>
> ======= Code to Reproduce =======
> import javax.swing.plaf.basic.BasicScrollBarUI;
> public class Test {
> private static class TestBasicScrollBarUI extends BasicScrollBarUI {
> @Override
> public void configureScrollBarColors() {
> super.configureScrollBarColors();
> }
> }
> public static void main(String[] args) {
> TestBasicScrollBarUI sbr = new TestBasicScrollBarUI();
> sbr.configureScrollBarColors();
> }
> }
> ======= end of code =======
> Harmony works silently, but RI throws NPE:
> java.lang.NullPointerException
> at javax.swing.LookAndFeel.installColors(LookAndFeel.java:56)
> at javax.swing.plaf.basic.BasicScrollBarUI.configureScrollBarColors(BasicScrollBarUI.java:113)
> at Test$TestBasicScrollBarUI.configureScrollBarColors(Test.java:7)
> at Test.main(Test.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.