Skip to content

Commit

Permalink
8274811: Remove superfluous use of boxing in java.base
Browse files Browse the repository at this point in the history
Reviewed-by: lancea
  • Loading branch information
Andrey Turbanov committed Jan 19, 2022
1 parent 44fe958 commit 5af7f25
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/java.base/linux/classes/sun/nio/fs/LinuxFileStore.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -112,7 +112,7 @@ private static int[] getKernelVersion() {
int[] majorMinorMicro = new int[3];
int length = Math.min(matches.length, majorMinorMicro.length);
for (int i = 0; i < length; i++) {
majorMinorMicro[i] = Integer.valueOf(matches[i]);
majorMinorMicro[i] = Integer.parseInt(matches[i]);
}
return majorMinorMicro;
}
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/util/ResourceBundle.java
Expand Up @@ -3729,7 +3729,7 @@ private static String toPackageName(String bundleName) {

}

private static final boolean TRACE_ON = Boolean.valueOf(
private static final boolean TRACE_ON = Boolean.parseBoolean(
GetPropertyAction.privilegedGetProperty("resource.bundle.debug", "false"));

private static void trace(String format, Object... params) {
Expand Down
12 changes: 6 additions & 6 deletions src/java.base/share/classes/sun/security/tools/keytool/Main.java
Expand Up @@ -4161,18 +4161,18 @@ private static Date getStartDate(String s) throws IOException {
}
if (date != null) {
if (date.matches("\\d\\d\\d\\d\\/\\d\\d\\/\\d\\d")) {
c.set(Integer.valueOf(date.substring(0, 4)),
Integer.valueOf(date.substring(5, 7))-1,
Integer.valueOf(date.substring(8, 10)));
c.set(Integer.parseInt(date.substring(0, 4)),
Integer.parseInt(date.substring(5, 7))-1,
Integer.parseInt(date.substring(8, 10)));
} else {
throw ioe;
}
}
if (time != null) {
if (time.matches("\\d\\d:\\d\\d:\\d\\d")) {
c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(time.substring(0, 2)));
c.set(Calendar.MINUTE, Integer.valueOf(time.substring(3, 5)));
c.set(Calendar.SECOND, Integer.valueOf(time.substring(6, 8)));
c.set(Calendar.HOUR_OF_DAY, Integer.parseInt(time.substring(0, 2)));
c.set(Calendar.MINUTE, Integer.parseInt(time.substring(3, 5)));
c.set(Calendar.SECOND, Integer.parseInt(time.substring(6, 8)));
c.set(Calendar.MILLISECOND, 0);
} else {
throw ioe;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -605,7 +605,7 @@ String getCacheKey() {
}
}

private static final boolean TRACE_ON = Boolean.valueOf(
private static final boolean TRACE_ON = Boolean.parseBoolean(
GetPropertyAction.privilegedGetProperty("locale.resources.debug", "false"));

public static void trace(String format, Object... params) {
Expand Down

1 comment on commit 5af7f25

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.