Skip to content

Commit 810fe6c

Browse files
authored
Add missing @Nullable annotation on the keystrokes parameter of setFocusTraversalKeys. (#133)
I made the change in `Container` (where the behavior for `null` is documented) and its subclass `JComponent` (where it's not). I didn't search for other overrides of the method.
1 parent 3101cf2 commit 810fe6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/java.desktop/share/classes/java/awt/Container.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3134,7 +3134,7 @@ public void list(PrintWriter out, int indent) {
31343134
* @since 1.4
31353135
*/
31363136
public void setFocusTraversalKeys(int id,
3137-
Set<? extends AWTKeyStroke> keystrokes)
3137+
@Nullable Set<? extends AWTKeyStroke> keystrokes)
31383138
{
31393139
if (id < 0 || id >= KeyboardFocusManager.TRAVERSAL_KEY_LENGTH) {
31403140
throw new IllegalArgumentException("invalid focus traversal key identifier");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4255,7 +4255,7 @@ void setUIProperty(String propertyName, Object value) {
42554255
* @since 1.5
42564256
*/
42574257
public void
4258-
setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)
4258+
setFocusTraversalKeys(int id, @Nullable Set<? extends AWTKeyStroke> keystrokes)
42594259
{
42604260
if (id == KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS) {
42614261
setFlag(FOCUS_TRAVERSAL_KEYS_FORWARD_SET,true);

0 commit comments

Comments
 (0)