## modules/graphics/src/main/java/com/sun/javafx/css/converters/EnumConverter.java

Print this page

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

    @@ -35,10 +35,11 @@
     import javafx.css.ParsedValue;
     import javafx.css.StyleConverter;
     import javafx.scene.text.Font;

     import java.util.HashMap;
    +import java.util.Locale;
     import java.util.Map;

     import com.sun.javafx.Logging;
     import sun.util.logging.PlatformLogger;
     import sun.util.logging.PlatformLogger.Level;

    @@ -62,11 +63,11 @@
             if (dotPos > -1) {
                 string = string.substring(dotPos + 1);
             }
             try {
                 string = string.replace('-', '_');
    -            return Enum.valueOf(enumClass, string.toUpperCase());
    +            return Enum.valueOf(enumClass, string.toUpperCase(Locale.ROOT));
             } catch (IllegalArgumentException e) {
                 // may throw another IllegalArgumentException
                 return Enum.valueOf(enumClass, string);
             }
         }