Skip to content

Commit 264af0d

Browse files
Remove deprecated instantiation of wrapper classes for primitives
CustomizedGitHooks: yes Change-Id: I3e461e53d73b9f3a0cc8f76906e65294acd65067
1 parent 5967b4e commit 264af0d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/src/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigAccess.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ public <T> T getFlag(String name, Class<T> type) {
378378
/**
379379
* @see HotSpotVMConfigAccess#getFlag(String, Class, Object)
380380
*/
381-
@SuppressWarnings("deprecation")
382381
public <T> T getFlag(String name, Class<T> type, T notPresent, boolean expectPresent) {
383382
if (expectPresent) {
384383
return getFlag(name, type);
@@ -391,13 +390,13 @@ public <T> T getFlag(String name, Class<T> type, T notPresent, boolean expectPre
391390
// overhead when running with assertions enabled.
392391
T sentinel;
393392
if (type == Boolean.class) {
394-
sentinel = type.cast(new Boolean(false));
393+
sentinel = type.cast(Boolean.valueOf(false));
395394
} else if (type == Byte.class) {
396-
sentinel = type.cast(new Byte((byte) 123));
395+
sentinel = type.cast(Byte.valueOf((byte) 123));
397396
} else if (type == Integer.class) {
398-
sentinel = type.cast(new Integer(1234567890));
397+
sentinel = type.cast(Integer.valueOf(1234567890));
399398
} else if (type == Long.class) {
400-
sentinel = type.cast(new Long(1234567890987654321L));
399+
sentinel = type.cast(Long.valueOf(1234567890987654321L));
401400
} else if (type == String.class) {
402401
sentinel = type.cast(new String("1234567890987654321"));
403402
} else {

0 commit comments

Comments
 (0)