mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8199800: Optimize Boolean.parseBoolean(String)
Reviewed-by: alanb
This commit is contained in:
parent
dd67e0fa16
commit
826b38052c
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ public final class Boolean implements java.io.Serializable,
|
|||
* @since 1.5
|
||||
*/
|
||||
public static boolean parseBoolean(String s) {
|
||||
return ((s != null) && s.equalsIgnoreCase("true"));
|
||||
return "true".equalsIgnoreCase(s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue