-
Bug
-
Resolution: Fixed
-
P3
-
7, 7u71, 7u72, 8, 8u20, 8u40
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083985 | emb-9 | Vivi An | P3 | Resolved | Fixed | team |
JDK-8086804 | 8u65 | Vivi An | P3 | Resolved | Fixed | b01 |
JDK-8138162 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
When running a swing app with the Java Access Bridge, it is possible to get an
IllegalArgumentException in JTree.AccessibleJTree.
There is no reliable test case, but the bug is easy to see in the code:
JTree.AccessibleJTree.getAccessibleChild(int i) has the following code (line 4370 JDK 1.8.0.40)
Object[] objPath = { model.getRoot() };
TreePath path = new TreePath(objPath);
The javadoc for the first line clearly states the model can return null for getRoot().
The javadoc for new TreePath(Object) clearly states null is not a valid argument.
This code needs a null check to return null in this case. (Note there are a few other uses of this code in AccessibleJTree that should be similarly changed)
IllegalArgumentException in JTree.AccessibleJTree.
There is no reliable test case, but the bug is easy to see in the code:
JTree.AccessibleJTree.getAccessibleChild(int i) has the following code (line 4370 JDK 1.8.0.40)
Object[] objPath = { model.getRoot() };
TreePath path = new TreePath(objPath);
The javadoc for the first line clearly states the model can return null for getRoot().
The javadoc for new TreePath(Object) clearly states null is not a valid argument.
This code needs a null check to return null in this case. (Note there are a few other uses of this code in AccessibleJTree that should be similarly changed)
- backported by
-
JDK-8083985 IllegalArgumentException in JTree.AccessibleJTree
-
- Resolved
-
-
JDK-8086804 IllegalArgumentException in JTree.AccessibleJTree
-
- Resolved
-
-
JDK-8138162 IllegalArgumentException in JTree.AccessibleJTree
-
- Resolved
-