Skip to content

Commit 026ff6d

Browse files
committed
Merge master jdk-17.0.14+7 into openj9-staging
Signed-off-by: J9 Build <[email protected]>
2 parents dadab05 + 06ef758 commit 026ff6d

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

make/conf/version-numbers.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -39,4 +39,4 @@ DEFAULT_VERSION_CLASSFILE_MINOR=0
3939
DEFAULT_VERSION_DOCS_API_SINCE=11
4040
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="16 17"
4141
DEFAULT_JDK_SOURCE_TARGET_VERSION=17
42-
DEFAULT_PROMOTED_VERSION_PRE=ea
42+
DEFAULT_PROMOTED_VERSION_PRE=

src/java.base/windows/classes/java/lang/ProcessImpl.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,14 @@ private static String[] getTokensFromCommand(String command) {
216216
private static final int VERIFICATION_LEGACY = 3;
217217
// See Command shell overview for documentation of special characters.
218218
// https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490954(v=technet.10)
219-
private static final char ESCAPE_VERIFICATION[][] = {
219+
private static final String ESCAPE_VERIFICATION[] = {
220220
// We guarantee the only command file execution for implicit [cmd.exe] run.
221221
// http://technet.microsoft.com/en-us/library/bb490954.aspx
222-
{' ', '\t', '\"', '<', '>', '&', '|', '^'},
223-
{' ', '\t', '\"', '<', '>'},
224-
{' ', '\t', '\"', '<', '>'},
225-
{' ', '\t'}
222+
// All space characters require quoting are checked in needsEscaping().
223+
"\"<>&|^",
224+
"\"<>",
225+
"\"<>",
226+
""
226227
};
227228

228229
private static String createCommandLine(int verificationType,
@@ -337,9 +338,14 @@ private static boolean needsEscaping(int verificationType, String arg) {
337338
}
338339

339340
if (!argIsQuoted) {
340-
char testEscape[] = ESCAPE_VERIFICATION[verificationType];
341-
for (int i = 0; i < testEscape.length; ++i) {
342-
if (arg.indexOf(testEscape[i]) >= 0) {
341+
for (int i = 0; i < arg.length(); i++) {
342+
char ch = arg.charAt(i);
343+
if (Character.isLetterOrDigit(ch))
344+
continue; // skip over common characters
345+
// All space chars require quotes and other mode specific characters
346+
if (Character.isSpaceChar(ch) ||
347+
Character.isWhitespace(ch) ||
348+
ESCAPE_VERIFICATION[verificationType].indexOf(ch) >= 0) {
343349
return true;
344350
}
345351
}

src/java.desktop/share/native/libawt/java2d/SurfaceData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct {
6060

6161
#define UNSAFE_TO_SUB(a, b) \
6262
(((b >= 0) && (a < 0) && (a < (INT_MIN + b))) || \
63-
((b < 0) && (a >= 0) && (-b > (INT_MAX - a)))) \
63+
((b < 0) && (a >= 0) && (a > (INT_MAX + b)))) \
6464

6565
/*
6666
* The SurfaceDataRasInfo structure is used to pass in and return various

0 commit comments

Comments
 (0)