-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b92
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8143508 | emb-9 | Sergey Bylokhov | P3 | Resolved | Fixed | team |
Java SE specification states for java.awt.Component
public Image createImage(int width,int height) method:
"Returns:
an off-screen drawable image, which can be used for double buffering.
The return value may be null if the component is not displayable."
The "may" statement is not strong enough and means that non-null
return values are permitted. However, many Java implementations: 1.4.2,
5.0, 6.0, 7 behave to return "null" only. Moreover corresponding JCK
test requires "null".
In order to avoid confusion interpreting this specification assertion
and to prevent from JCK, TCK test challenges the spec wording must be
fixed to make "null" behavior concrete.
public Image createImage(int width,int height) method:
"Returns:
an off-screen drawable image, which can be used for double buffering.
The return value may be null if the component is not displayable."
The "may" statement is not strong enough and means that non-null
return values are permitted. However, many Java implementations: 1.4.2,
5.0, 6.0, 7 behave to return "null" only. Moreover corresponding JCK
test requires "null".
In order to avoid confusion interpreting this specification assertion
and to prevent from JCK, TCK test challenges the spec wording must be
fixed to make "null" behavior concrete.
- backported by
-
JDK-8143508 java.awt.Component.createImage(int width,int height) should remove behavioral optionality
-
- Resolved
-
- duplicates
-
JDK-6186530 Documentation bug for Component.createVolatileImage
-
- Closed
-
- relates to
-
JDK-4427495 Documentation bug for Component.create*Image(w,h)
-
- Resolved
-