--- old/src/windows/native/sun/windows/awt_Component.cpp 2013-08-01 15:55:34.491463900 +0400 +++ new/src/windows/native/sun/windows/awt_Component.cpp 2013-08-01 15:55:33.834426300 +0400 @@ -3528,8 +3528,12 @@ if (ops == SAVE) { transTable.put(reinterpret_cast(static_cast(wkey)), reinterpret_cast(static_cast(translation))); - deadKeyFlagTable.put(reinterpret_cast(static_cast(wkey)), - reinterpret_cast(static_cast(deadKeyFlag))); + if (deadKeyFlag) { + deadKeyFlagTable.put(reinterpret_cast(static_cast(wkey)), + reinterpret_cast(static_cast(deadKeyFlag))); + } else { + deadKeyFlagTable.remove(reinterpret_cast(static_cast(wkey))); + } } isDeadKey = deadKeyFlag; --- /dev/null 2013-08-01 15:55:38.000000000 +0400 +++ new/test/java/awt/event/KeyEvent/DeadKey/DeadKeySystemAssertionDialog.java 2013-08-01 15:55:37.984663700 +0400 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Frame; +import java.awt.Robot; +import java.awt.TextField; +import java.awt.Toolkit; +import java.awt.event.KeyEvent; +import sun.awt.SunToolkit; +/* + * @test + * @bug 8013849 + * @summary Awt assert on Hashtable.cpp:124 + * @author alexandr.scherbatiy area=awt.event + * @run main/timeout=5 DeadKeySystemAssertionDialog + */ + +public class DeadKeySystemAssertionDialog { + + public static void main(String[] args) throws Exception { + + SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); + Frame frame = new Frame(); + frame.setSize(300, 200); + + TextField textField = new TextField(); + frame.add(textField); + + frame.setVisible(true); + toolkit.realSync(); + + textField.requestFocus(); + toolkit.realSync(); + + // Check that the system assertion dialog does not block Java + Robot robot = new Robot(); + robot.setAutoDelay(50); + robot.keyPress(KeyEvent.VK_A); + robot.keyRelease(KeyEvent.VK_A); + toolkit.realSync(); + + frame.setVisible(false); + } +}