6979537: closed/javax/swing/JSplitPane/UnitTest/UnitTest.java fails
Reviewed-by: rupashka
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Mon Feb 07 21:15:51 2011 +0300
+++ b/jdk/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();