Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6902615

Method JTextComponent.getKeyStrokesForAction() throws StackOverflowError

    Details

    • Subcomponent:
    • Resolved In Build:
      b130
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        JDK: 1.4, 1.5, 6b105(RI), 6u16, 7
        Platform: Windows, Solaris
        Failing JCK test: api/javax_swing/text/Keymap/index.html#Keymap[Keymap010]

        The following minimized code sample:
        -------------------------------------------------------------
        import javax.swing.*;
        import javax.swing.text.Keymap;
        import java.awt.event.ActionEvent;

        public class MiniTest {

            public static void main(String[] args) {

                Keymap keyMap = new JTextPane().getKeymap();
                keyMap.setResolveParent(keyMap);

                new JTextPane().getKeymap().getKeyStrokesForAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent e) { }
                });
            }
        }
        -------------------------------------------------------------
        Causes:

        Exception in thread "main" java.lang.StackOverflowError
        at javax.swing.text.JTextComponent$DefaultKeymap.getKeyStrokesForAction(JTextComponent.java:4143)
        at javax.swing.text.JTextComponent$DefaultKeymap.getKeyStrokesForAction(JTextComponent.java:4160)
        at javax.swing.text.JTextComponent$DefaultKeymap.getKeyStrokesForAction(JTextComponent.java:4160)
        at javax.swing.text.JTextComponent$DefaultKeymap.getKeyStrokesForAction(JTextComponent.java:4160)
        .........

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rupashka Pavel Porvatov (Inactive)
                  Reporter:
                  dbessono Dmitry Bessonov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: