# HG changeset patch # User pchelko # Date 1387264767 -14400 # Node ID b9f47a000ebdf7873a54b91ac792a8caf0c8d25a # Parent 57997d148fc043185757be1f9ba01b6c64581a6c 8023148: [macosx] java.util.NoSuchElementException at java.util.LinkedList.getFirst Reviewed-by: ant, serb diff -r 57997d148fc0 -r b9f47a000ebd jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java --- a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Mon Dec 16 17:35:08 2013 +0400 +++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Tue Dec 17 11:19:27 2013 +0400 @@ -287,7 +287,7 @@ synchronized (this) { KeyEvent ke = enqueuedKeyEvents.isEmpty() ? null : enqueuedKeyEvents.getFirst(); if (ke != null && time >= ke.getWhen()) { - TypeAheadMarker marker = typeAheadMarkers.getFirst(); + TypeAheadMarker marker = typeAheadMarkers.isEmpty() ? null : typeAheadMarkers.getFirst(); if (marker != null) { Window toplevel = marker.untilFocused.getContainingWindow(); // Check that the component awaiting focus belongs to