-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
1.3.0
-
sparc
-
solaris_2.6
Name: sdC67446 Date: 08/27/99
The method
public Object[] allKeys()
of class javax.swing.ActionMap
throws StackOverflowError if action map is the parent for itself.
The doc says:
--------------------------------------------------
public Object[] allKeys()
Returns an array of the keys defined in this ActionMap and
its parent. This method differs from keys() in that
this method includes the keys defined in the parent.
The test demonstrating the bug:
-----------------Test.java------------------------
import javax.swing.*;
public class Test {
public static void main(String[] args) {
ActionMap map = new ActionMap();
map.setParent(map);
map.allKeys();
}
}
---------Output from the test---------------------
Exception in thread "main" java.lang.StackOverflowError
at javax.swing.ActionMap.size(ActionMap.java:139)
at javax.swing.ActionMap.allKeys(ActionMap.java:151)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
at javax.swing.ActionMap.allKeys(ActionMap.java:156)
....................................................
--------------------------------------------------
======================================================================