-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
None
-
merlin
-
generic
-
generic
If KeyStroke.getKeyStroke(String) is passed an empty string, a NoSuchElementException will be thrown by StringTokenizer.nextToken(). The getKeyStroke method wrongly assumes that null will be returned if there aren't any tokens.
Here's the test case:
import javax.swing.KeyStroke;
public class KeyStrokeTest {
public static void main(String[] args) {
KeyStroke ks = KeyStroke.getKeyStroke("");
}
}
Here's the test case:
import javax.swing.KeyStroke;
public class KeyStrokeTest {
public static void main(String[] args) {
KeyStroke ks = KeyStroke.getKeyStroke("");
}
}