Skip to content

Commit 1130c1b

Browse files
committed
6798061: The removal of System.out.println from KeyboardManager
Reviewed-by: prr
1 parent 2f63d3a commit 1130c1b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/java.desktop/share/classes/javax/swing/KeyboardManager.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -118,9 +118,6 @@ public void registerKeyStroke(KeyStroke k, JComponent c) {
118118
v.addElement(c);
119119
keyMap.put(k, v);
120120
}
121-
} else {
122-
System.out.println("Unexpected condition in registerKeyStroke");
123-
Thread.dumpStack();
124121
}
125122

126123
componentKeyStrokeMap.put(new ComponentKeyStrokePair(c,k), topContainer);
@@ -208,11 +205,6 @@ public void unregisterKeyStroke(KeyStroke ks, JComponent c) {
208205
@SuppressWarnings("deprecation")
209206
public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor) {
210207

211-
if (e.isConsumed()) {
212-
System.out.println("Acquired pre-used event!");
213-
Thread.dumpStack();
214-
}
215-
216208
// There may be two keystrokes associated with a low-level key event;
217209
// in this case a keystroke made of an extended key code has a priority.
218210
KeyStroke ks;
@@ -266,10 +258,6 @@ public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAnce
266258
return true;
267259
}
268260
}
269-
} else {
270-
System.out.println( "Unexpected condition in fireKeyboardAction " + tmp);
271-
// This means that tmp wasn't null, a JComponent, or a Vector. What is it?
272-
Thread.dumpStack();
273261
}
274262
}
275263

0 commit comments

Comments
 (0)