changeset 3617:989f6d3eee0d

6979537: closed/javax/swing/JSplitPane/UnitTest/UnitTest.java fails Reviewed-by: rupashka
author alexp
date Mon, 07 Feb 2011 21:34:31 +0300
parents c7e368a95c75
children 842a0f8c89ea
files src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Mon Feb 07 21:15:51 2011 +0300
+++ b/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Mon Feb 07 21:34:31 2011 +0300
@@ -342,12 +342,10 @@
 
         setOrientation(splitPane.getOrientation());
 
-        // This plus 2 here is to provide backwards consistancy. Previously,
-        // the old size did not include the 2 pixel border around the divider,
-        // it now does.
-        Integer dividerSize = (Integer)UIManager.get("SplitPane.dividerSize");
-        if (divider == null) dividerSize = 10;
-        LookAndFeel.installProperty(splitPane, "dividerSize", dividerSize);
+        // note: don't rename this temp variable to dividerSize
+        // since it will conflict with "this.dividerSize" field
+        Integer temp = (Integer)UIManager.get("SplitPane.dividerSize");
+        LookAndFeel.installProperty(splitPane, "dividerSize", temp == null? 10: temp);
 
         divider.setDividerSize(splitPane.getDividerSize());
         dividerSize = divider.getDividerSize();