## modules/graphics/src/main/java/javafx/scene/input/KeyCombination.java

Print this page

    rev 4839 : RT-2529: Locale specific runtime errors (Turkish)

    @@ -26,10 +26,11 @@
     package javafx.scene.input;

     import com.sun.javafx.tk.Toolkit;
     import java.util.ArrayList;
     import java.util.List;
    +import java.util.Locale;

     // PENDING_DOC_REVIEW
     /**
      * Represents a combination of keys which are used in keyboard shortcuts.
      * A key combination consists of a main key and a set of modifier keys. The main

    @@ -578,12 +579,12 @@
             for (final String word: words) {
                 if (sb.length() > 0) {
                     sb.append(' ');
                 }

    -            sb.append(word.substring(0, 1).toUpperCase());
    -            sb.append(word.substring(1).toLowerCase());
    +            sb.append(word.substring(0, 1).toUpperCase(Locale.ROOT));
    +            sb.append(word.substring(1).toLowerCase(Locale.ROOT));
             }

             return sb.toString();
         }