-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b14
-
x86
-
linux
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
In class javax.swing.plaf.synth.ParsedSynthStyle in build 126 of JDK 7
a method parameter is named "direction", but it should be named
"tabIndex".
Starting at line 1937 of ParsedSynthStyle we have:
public void paintTabbedPaneTabBackground(SynthContext context,
Graphics g, int x, int y, int w, int h, int direction) {
getPainter(context, "tabbedpanetabbackground", -1).
paintTabbedPaneTabBackground(context, g, x, y, w, h, direction);
}
However, the last parameter to the called paintTabbedPaneTabBackground
method expects a tabIndex, not a direction.
I used the Fenum Checker from the Checker Framework
(http://types.cs.washington.edu/checker-framework/) to check for
consistent usage of directions and found this inconsistency.
The attached patch fixes this problem.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
This is a patch for ParsedSynthStyle.java from OpenJDK 7 build 126:
1938c1938
< Graphics g, int x, int y, int w, int h, int direction) {
---
> Graphics g, int x, int y, int w, int h, int tabIndex) {
1940c1940
< paintTabbedPaneTabBackground(context, g, x, y, w, h, direction);
---
> paintTabbedPaneTabBackground(context, g, x, y, w, h, tabIndex);
A DESCRIPTION OF THE PROBLEM :
In class javax.swing.plaf.synth.ParsedSynthStyle in build 126 of JDK 7
a method parameter is named "direction", but it should be named
"tabIndex".
Starting at line 1937 of ParsedSynthStyle we have:
public void paintTabbedPaneTabBackground(SynthContext context,
Graphics g, int x, int y, int w, int h, int direction) {
getPainter(context, "tabbedpanetabbackground", -1).
paintTabbedPaneTabBackground(context, g, x, y, w, h, direction);
}
However, the last parameter to the called paintTabbedPaneTabBackground
method expects a tabIndex, not a direction.
I used the Fenum Checker from the Checker Framework
(http://types.cs.washington.edu/checker-framework/) to check for
consistent usage of directions and found this inconsistency.
The attached patch fixes this problem.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
This is a patch for ParsedSynthStyle.java from OpenJDK 7 build 126:
1938c1938
< Graphics g, int x, int y, int w, int h, int direction) {
---
> Graphics g, int x, int y, int w, int h, int tabIndex) {
1940c1940
< paintTabbedPaneTabBackground(context, g, x, y, w, h, direction);
---
> paintTabbedPaneTabBackground(context, g, x, y, w, h, tabIndex);