src/java.desktop/unix/classes/sun/awt/X11InputMethodBase.java
changeset 54871 c2e4aef5edf2
parent 52248 2e330da7cbf4
equal deleted inserted replaced
54870:0d49e7c0b4fa 54871:c2e4aef5edf2
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   509         String flush = (committedText != null ? committedText : "");
   509         String flush = (committedText != null ? committedText : "");
   510         if (composedText != null) {
   510         if (composedText != null) {
   511             flush += composedText.toString();
   511             flush += composedText.toString();
   512         }
   512         }
   513 
   513 
   514         if (!flush.equals("")) {
   514         if (!flush.isEmpty()) {
   515             AttributedString attrstr = new AttributedString(flush);
   515             AttributedString attrstr = new AttributedString(flush);
   516             postInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
   516             postInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
   517                                  attrstr.getIterator(),
   517                                  attrstr.getIterator(),
   518                                  flush.length(),
   518                                  flush.length(),
   519                                  null,
   519                                  null,