Skip to content

Commit 79fffd0

Browse files
author
Martin Buchholz
committed
8200364: Remove unnecessary boxing via primitive wrapper valueOf(String) methods
Reviewed-by: dfuchs, alanb
1 parent 826b380 commit 79fffd0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/java.base/share/classes/java/text/ChoiceFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void applyPattern(String newPattern) {
212212
} else if (tempBuffer.equals("-\u221E")) {
213213
startValue = Double.NEGATIVE_INFINITY;
214214
} else {
215-
startValue = Double.valueOf(tempBuffer);
215+
startValue = Double.parseDouble(tempBuffer);
216216
}
217217

218218
if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&

src/java.logging/share/classes/java/util/logging/Logger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ public String run() {
640640
return System.getProperty(key);
641641
}
642642
});
643-
return Boolean.valueOf(s);
643+
return Boolean.parseBoolean(s);
644644
}
645645
}
646646

0 commit comments

Comments
 (0)