-
Bug
-
Resolution: Fixed
-
P4
-
17, 21
-
None
-
b06
-
generic
-
generic
The next implementation of ColorModel.getRGBdefault() is not thread-safe:
private static ColorModel RGBdefault;
public static ColorModel getRGBdefault() {
if (RGBdefault == null) {
RGBdefault = new DirectColorModel(32,
0x00ff0000, // Red
0x0000ff00, // Green
0x000000ff, // Blue
0xff000000 // Alpha
);
}
return RGBdefault;
}
private static ColorModel RGBdefault;
public static ColorModel getRGBdefault() {
if (RGBdefault == null) {
RGBdefault = new DirectColorModel(32,
0x00ff0000, // Red
0x0000ff00, // Green
0x000000ff, // Blue
0xff000000 // Alpha
);
}
return RGBdefault;
}