JDK-7040577 : Default implementation of Toolkit.loadSystemColors(int[]) and many others doesn't throw HE in hl env
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-04-29
  • Updated: 2019-12-07
  • Resolved: 2011-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b143Fixed
Related Reports
Relates :  
Relates :  
Description
Please see #7021001 for the description of the problem.
It was partially fixed. 
Unfortunately the suggested fix for 7021001 does not cover all the problematic methods.

The following methods are still not fixed in JDK7 b140

          http://download.java.net/jdk7/docs/api/java/awt/Toolkit.html#getLockingKeyState%28int%29
          http://download.java.net/jdk7/docs/api/java/awt/Toolkit.html#setLockingKeyState%28int,%20boolean%29

The following tests still fail

api/java_awt/Toolkit/indexTGF.html#HeadlessExceptions[setLockingKeyState_defaultMethodImpl]
api/java_awt/Toolkit/indexTGF.html#HeadlessExceptions[getLockingKeyState_defaultMethodImpl]

Please see #7021001 for code sample

Comments
EVALUATION If the test makes a Toolkit sibling calls its methids in headless env we may fail in two particular cases. I'm attaching such test NoHE.java as well as less complex test J.java (which works well in headless mode w/o any jdk modifications). Just to make sure we satisfy that first test logic we should throw HE from every Toolkit method.
29-04-2011

SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/7/7040577/
29-04-2011