Summary
-------
Make clear in the specification of java.awt.Toolkit the handling of empty or white space values for
the system property "javax.accessibility.assistive_technologies".
Problem
-------
The system property javax.accessibility.assistive_technologies has been used since JDK 1.2 to
name a class, or comma-separated list of classes, which load Assistive Technologies.
The specification has always documented AWTError is thrown when there is any problem
either parsing the value, or loading the classes.
An empty string does not specify a valid class name, but prior to JDK 9, as an artifact of the
parsing implementation, this produced no error.
In JDK 9, changes which were made as part of migrating to support the module system
unconsciously changed this behavior to throw AWTError.
Solution
--------
The proposed solution is to restore compatibility with long-standing behavior and
document this handling in the specification to make it clear.
Specification
-------------
src/java.desktop/share/classes/java/awt/Toolkit.java
.......
- * toolkit is created. All errors are handled via an AWTError exception.
+ * toolkit is created.
+ * <p>
+ * If the list of assistive technology providers as provided through system
+ * property "{@systemProperty javax.accessibility.assistive_technologies}"
+ * is the empty string or contains only
+ * {@linkplain Character#isWhitespace(int) white space} characters it is ignored.
+ * All other errors are handled via an AWTError exception.
.......
public static synchronized Toolkit getDefaultToolkit() {
Reference for convenience: http://cr.openjdk.java.net/~serb/8216008/webrev.00/src/java.desktop/share/classes/java/awt/Toolkit.java.udiff.html