-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
None
-
1.2fcs
-
sparc
-
solaris_2.5
-
Not verified
If a Java2D program is run on an X11 system which only presents GrayScale or
StaticGray visuals, the program will throw an exception after it
attempts to get the GraphicsConfiguration type.
The offending code is in src/solaris/native/sun/awt/awt_GraphicsEnv.c
Java_sun_awt_X11GraphicsDevice_getConfigType
(JNIEnv *env, jobject this, jint index)
{
switch (awt_visInfo.class) {
case TrueColor:
return (awt_visInfo.red_mask == 0xff
? sun_awt_X11GraphicsConfig_TRUE_24_BGR
: sun_awt_X11GraphicsConfig_TRUE_24_RGB);
case PseudoColor:
return sun_awt_X11GraphicsConfig_PSEUDO_8;
}
return sun_awt_X11GraphicsConfig_UNKNOWN;
}
If the device does not support either TrueColor or PseudoColor
visuals, the call returns sun_awt_X11GraphicsConfig_UNKNOWN
which causes an exception to be thrown.
This bug is somewhat related to bug# 4114496.
StaticGray visuals, the program will throw an exception after it
attempts to get the GraphicsConfiguration type.
The offending code is in src/solaris/native/sun/awt/awt_GraphicsEnv.c
Java_sun_awt_X11GraphicsDevice_getConfigType
(JNIEnv *env, jobject this, jint index)
{
switch (awt_visInfo.class) {
case TrueColor:
return (awt_visInfo.red_mask == 0xff
? sun_awt_X11GraphicsConfig_TRUE_24_BGR
: sun_awt_X11GraphicsConfig_TRUE_24_RGB);
case PseudoColor:
return sun_awt_X11GraphicsConfig_PSEUDO_8;
}
return sun_awt_X11GraphicsConfig_UNKNOWN;
}
If the device does not support either TrueColor or PseudoColor
visuals, the call returns sun_awt_X11GraphicsConfig_UNKNOWN
which causes an exception to be thrown.
This bug is somewhat related to bug# 4114496.