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

Print this page

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

    @@ -26,10 +26,11 @@
     package com.sun.javafx.css.converters;

     import com.sun.javafx.Utils;
     import com.sun.javafx.css.Size;
     import com.sun.javafx.css.StyleConverterImpl;
    +import java.util.Locale;
     import java.util.Map;
     import java.util.Map.Entry;
     import javafx.css.CssMetaData;
     import javafx.css.ParsedValue;
     import javafx.css.StyleConverter;

    @@ -130,11 +131,11 @@

                 FontPosture style = null;

                 if (val instanceof String) {
                     try {
    -                    String sval = ((String)val).toUpperCase();
    +                    String sval = ((String)val).toUpperCase(Locale.ROOT);
                         style = Enum.valueOf(FontPosture.class, sval);
                     } catch (IllegalArgumentException iae) {
                         style =  FontPosture.REGULAR;
                     } catch (NullPointerException npe) {
                         style =  FontPosture.REGULAR;

    @@ -176,11 +177,11 @@

                 FontWeight weight = null;

                 if (val instanceof String) {
                     try {
    -                    String sval = ((String)val).toUpperCase();
    +                    String sval = ((String)val).toUpperCase(Locale.ROOT);
                         weight = Enum.valueOf(FontWeight.class, sval);
                     } catch (IllegalArgumentException iae) {
                         weight =  FontWeight.NORMAL;
                     } catch (NullPointerException npe) {
                         weight =  FontWeight.NORMAL;