# HG changeset patch # User martin # Date 1523380681 25200 # Node ID 08d1b228e80542a92d0db32f8bb6a8e53581f2b3 # Parent b2bd13eafc1c057ecd039047843cb9077e1b824e 8201328: SynthParser should use Boolean.parseBoolean Reviewed-by: serb diff -r b2bd13eafc1c -r 08d1b228e805 src/java.desktop/share/classes/javax/swing/plaf/synth/SynthParser.java --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthParser.java Tue Apr 10 10:17:35 2018 -0700 +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthParser.java Tue Apr 10 10:18:01 2018 -0700 @@ -746,12 +746,7 @@ value = lookup(aValue, Object.class); break; case 1: // boolean - if (aValue.toUpperCase().equals("TRUE")) { - value = Boolean.TRUE; - } - else { - value = Boolean.FALSE; - } + value = Boolean.parseBoolean(aValue); break; case 2: // dimension StringTokenizer tok = new StringTokenizer(aValue); @@ -939,11 +934,11 @@ ": destinationInsets must be top left bottom right"); } else if (key.equals(ATTRIBUTE_PAINT_CENTER)) { - paintCenter = value.toLowerCase().equals("true"); + paintCenter = Boolean.parseBoolean(value); paintCenterSpecified = true; } else if (key.equals(ATTRIBUTE_STRETCH)) { - stretch = value.toLowerCase().equals("true"); + stretch = Boolean.parseBoolean(value); stretchSpecified = true; } else if (key.equals(ATTRIBUTE_DIRECTION)) { @@ -989,7 +984,7 @@ } } else if (key.equals(ATTRIBUTE_CENTER)) { - center = value.toLowerCase().equals("true"); + center = Boolean.parseBoolean(value); } } if (painter == null) {