8200364: Remove unnecessary boxing via primitive wrapper valueOf(String) methods
authormartin
Mon, 02 Apr 2018 17:09:29 -0700
changeset 49510 a7777856ae98
parent 49509 94ca39ef0b39
child 49511 ba93b3928e7c
8200364: Remove unnecessary boxing via primitive wrapper valueOf(String) methods Reviewed-by: dfuchs, alanb
src/java.base/share/classes/java/text/ChoiceFormat.java
src/java.logging/share/classes/java/util/logging/Logger.java
--- a/src/java.base/share/classes/java/text/ChoiceFormat.java	Mon Apr 02 17:08:00 2018 -0700
+++ b/src/java.base/share/classes/java/text/ChoiceFormat.java	Mon Apr 02 17:09:29 2018 -0700
@@ -212,7 +212,7 @@
                 } else if (tempBuffer.equals("-\u221E")) {
                     startValue = Double.NEGATIVE_INFINITY;
                 } else {
-                    startValue = Double.valueOf(tempBuffer);
+                    startValue = Double.parseDouble(tempBuffer);
                 }
 
                 if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&
--- a/src/java.logging/share/classes/java/util/logging/Logger.java	Mon Apr 02 17:08:00 2018 -0700
+++ b/src/java.logging/share/classes/java/util/logging/Logger.java	Mon Apr 02 17:09:29 2018 -0700
@@ -640,7 +640,7 @@
                     return System.getProperty(key);
                 }
             });
-            return Boolean.valueOf(s);
+            return Boolean.parseBoolean(s);
         }
     }