-
Bug
-
Resolution: Unresolved
-
P5
-
None
-
5.0
-
Fix Understood
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 2000 5.0
A DESCRIPTION OF THE PROBLEM :
Color(int rgba, boolean hasalpha)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
This javadoc is misleading. The variable should be called argb not rgba to make it clear the alpha channel goes in the high order bits.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look in the JDK docs for java.awt.Color
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The variable should follow the convention used elsewhere in the JDK when talking about mapping colours to ints.
ACTUAL -
The naming convention in violated.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
read the docs carefully not just the misleading one line summary.
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 2000 5.0
A DESCRIPTION OF THE PROBLEM :
Color(int rgba, boolean hasalpha)
Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
This javadoc is misleading. The variable should be called argb not rgba to make it clear the alpha channel goes in the high order bits.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look in the JDK docs for java.awt.Color
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The variable should follow the convention used elsewhere in the JDK when talking about mapping colours to ints.
ACTUAL -
The naming convention in violated.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
read the docs carefully not just the misleading one line summary.