-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 1.3.0
-
Component/s: client-libs
-
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("");
}
}