Skip to content

Commit e1db928

Browse files
authored
Merge branch 'master' into goetz_backport_8358532
2 parents 1ab6169 + d39ca87 commit e1db928

File tree

73 files changed

+1213
-1166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1213
-1166
lines changed

.github/workflows/build-cross-compile.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@ jobs:
6060
gnu-arch: aarch64
6161
debian-arch: arm64
6262
debian-repository: https://httpredir.debian.org/debian/
63-
debian-version: bookworm
63+
debian-version: trixie
6464
tolerate-sysroot-errors: false
6565
- target-cpu: arm
6666
gnu-arch: arm
6767
debian-arch: armhf
6868
debian-repository: https://httpredir.debian.org/debian/
69-
debian-version: bookworm
69+
debian-version: trixie
7070
tolerate-sysroot-errors: false
7171
gnu-abi: eabihf
7272
- target-cpu: s390x
7373
gnu-arch: s390x
7474
debian-arch: s390x
7575
debian-repository: https://httpredir.debian.org/debian/
76-
debian-version: bookworm
76+
debian-version: trixie
7777
tolerate-sysroot-errors: false
7878
- target-cpu: ppc64le
7979
gnu-arch: powerpc64le
8080
debian-arch: ppc64el
8181
debian-repository: https://httpredir.debian.org/debian/
82-
debian-version: bookworm
82+
debian-version: trixie
8383
tolerate-sysroot-errors: false
8484
- target-cpu: riscv64
8585
gnu-arch: riscv64
8686
debian-arch: riscv64
8787
debian-repository: https://httpredir.debian.org/debian/
88-
debian-version: sid
89-
tolerate-sysroot-errors: true
88+
debian-version: trixie
89+
tolerate-sysroot-errors: false
9090

9191
steps:
9292
- name: 'Checkout the JDK source'

src/java.desktop/share/classes/javax/swing/JViewport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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

src/java.desktop/share/classes/javax/swing/TablePrintable.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
282282
// dictated by the previous two assertions
283283
assert sf > 0;
284284

285+
Rectangle bounds = table.getBounds();
286+
bounds.x = bounds.y = 0;
287+
285288
// This is in a loop for two reasons:
286289
// First, it allows us to catch up in case we're called starting
287290
// with a non-zero pageIndex. Second, we know that we can be called
@@ -303,9 +306,10 @@ public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
303306
// calculate the area of the table to be printed for this page
304307
findNextClip(scaledWidth, scaledHeight);
305308

306-
if (!((table.getBounds()).intersects(clip))) {
309+
if (!(bounds.intersects(clip))) {
307310
return NO_SUCH_PAGE;
308311
}
312+
309313
last++;
310314
}
311315

@@ -395,8 +399,6 @@ public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
395399
// draw a box around the table
396400
g2d.setColor(Color.BLACK);
397401

398-
Rectangle bounds = table.getBounds();
399-
bounds.x = bounds.y = 0;
400402

401403
// compute the visible portion of table and draw the rect around it
402404
Rectangle visibleBounds = clip.intersection(bounds);

src/java.desktop/share/classes/sun/print/PathGraphics.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2024, 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
@@ -69,6 +69,7 @@
6969
import java.awt.image.DataBufferInt;
7070
import java.awt.image.ImageObserver;
7171
import java.awt.image.IndexColorModel;
72+
import java.awt.image.MultiResolutionImage;
7273
import java.awt.image.Raster;
7374
import java.awt.image.RenderedImage;
7475
import java.awt.image.SampleModel;
@@ -1138,6 +1139,9 @@ protected BufferedImage getBufferedImage(Image img) {
11381139
// VI needs to make a new BI: this is unavoidable but
11391140
// I don't expect VI's to be "huge" in any case.
11401141
return ((VolatileImage)img).getSnapshot();
1142+
} else if (img instanceof MultiResolutionImage) {
1143+
return convertToBufferedImage((MultiResolutionImage) img,
1144+
img.getWidth(null), img.getHeight(null));
11411145
} else {
11421146
// may be null or may be some non-standard Image which
11431147
// shouldn't happen as Image is implemented by the platform
@@ -1148,6 +1152,18 @@ protected BufferedImage getBufferedImage(Image img) {
11481152
}
11491153
}
11501154

1155+
protected BufferedImage convertToBufferedImage(MultiResolutionImage multiResolutionImage,
1156+
double width, double height ) {
1157+
Image resolutionImage = multiResolutionImage.getResolutionVariant(width, height);
1158+
BufferedImage bufferedImage = new BufferedImage(resolutionImage.getWidth(null),
1159+
resolutionImage.getHeight(null),
1160+
BufferedImage.TYPE_INT_ARGB);
1161+
Graphics2D g2d = bufferedImage.createGraphics();
1162+
g2d.drawImage(resolutionImage, 0, 0, (int) width, (int) height, null);
1163+
g2d.dispose();
1164+
return bufferedImage;
1165+
}
1166+
11511167
/**
11521168
* Return true if the BufferedImage argument has non-opaque
11531169
* bits in it and therefore can not be directly rendered by

src/java.desktop/share/classes/sun/swing/SwingUtilities2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2024, 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

src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,8 +1317,7 @@ jobject ckAttributeValueToJObject(JNIEnv *env, const CK_ATTRIBUTE_PTR ckpAttribu
13171317
case CKA_OWNER:
13181318
case CKA_AC_ISSUER:
13191319
case CKA_ATTR_TYPES:
1320-
case CKA_ECDSA_PARAMS:
1321-
/* CKA_EC_PARAMS is the same, these two are equivalent */
1320+
case CKA_EC_PARAMS:
13221321
case CKA_EC_POINT:
13231322
case CKA_PRIVATE_EXPONENT:
13241323
case CKA_PRIME_1:

src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_keymgmt.c

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
*/
44

55
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
@@ -56,69 +56,78 @@
5656

5757
#ifdef P11_ENABLE_GETNATIVEKEYINFO
5858

59-
#define CK_ATTRIBUTES_TEMPLATE_LENGTH (CK_ULONG)61U
59+
#define CK_ATTRIBUTES_TEMPLATE_LENGTH (CK_ULONG)60U
6060

61+
// Group attributes based on their value types; put attributes whose values
62+
// requiring address alignments, e.g. CK_ULONG, first
6163
static CK_ATTRIBUTE ckpAttributesTemplate[CK_ATTRIBUTES_TEMPLATE_LENGTH] = {
62-
{CKA_CLASS, 0, 0},
63-
{CKA_TOKEN, 0, 0},
64-
{CKA_PRIVATE, 0, 0},
65-
{CKA_LABEL, 0, 0},
66-
{CKA_APPLICATION, 0, 0},
67-
{CKA_VALUE, 0, 0},
68-
{CKA_OBJECT_ID, 0, 0},
64+
// CK_ULONG
6965
{CKA_CERTIFICATE_TYPE, 0, 0},
70-
{CKA_ISSUER, 0, 0},
71-
{CKA_SERIAL_NUMBER, 0, 0},
72-
{CKA_AC_ISSUER, 0, 0},
73-
{CKA_OWNER, 0, 0},
74-
{CKA_ATTR_TYPES, 0, 0},
75-
{CKA_TRUSTED, 0, 0},
66+
{CKA_CLASS, 0, 0},
67+
{CKA_HW_FEATURE_TYPE, 0, 0},
68+
{CKA_KEY_GEN_MECHANISM, 0, 0},
7669
{CKA_KEY_TYPE, 0, 0},
77-
{CKA_SUBJECT, 0, 0},
78-
{CKA_ID, 0, 0},
79-
{CKA_SENSITIVE, 0, 0},
80-
{CKA_ENCRYPT, 0, 0},
81-
{CKA_DECRYPT, 0, 0},
82-
{CKA_WRAP, 0, 0},
83-
{CKA_UNWRAP, 0, 0},
84-
{CKA_SIGN, 0, 0},
85-
{CKA_SIGN_RECOVER, 0, 0},
86-
{CKA_VERIFY, 0, 0},
87-
{CKA_VERIFY_RECOVER, 0, 0},
88-
{CKA_DERIVE, 0, 0},
89-
{CKA_START_DATE, 0, 0},
90-
{CKA_END_DATE, 0, 0},
91-
{CKA_MODULUS, 0, 0},
9270
{CKA_MODULUS_BITS, 0, 0},
93-
{CKA_PUBLIC_EXPONENT, 0, 0},
94-
{CKA_PRIVATE_EXPONENT, 0, 0},
95-
{CKA_PRIME_1, 0, 0},
96-
{CKA_PRIME_2, 0, 0},
97-
{CKA_EXPONENT_1, 0, 0},
98-
{CKA_EXPONENT_2, 0, 0},
99-
{CKA_COEFFICIENT, 0, 0},
100-
{CKA_PRIME, 0, 0},
101-
{CKA_SUBPRIME, 0, 0},
102-
{CKA_BASE, 0, 0},
10371
{CKA_PRIME_BITS, 0, 0},
10472
{CKA_SUB_PRIME_BITS, 0, 0},
10573
{CKA_VALUE_BITS, 0, 0},
10674
{CKA_VALUE_LEN, 0, 0},
75+
// CK_BBOOL
76+
{CKA_ALWAYS_SENSITIVE, 0, 0},
77+
{CKA_DECRYPT, 0, 0},
78+
{CKA_DERIVE, 0, 0},
79+
{CKA_ENCRYPT, 0, 0},
10780
{CKA_EXTRACTABLE, 0, 0},
81+
{CKA_HAS_RESET, 0, 0},
10882
{CKA_LOCAL, 0, 0},
109-
{CKA_NEVER_EXTRACTABLE, 0, 0},
110-
{CKA_ALWAYS_SENSITIVE, 0, 0},
111-
{CKA_KEY_GEN_MECHANISM, 0, 0},
11283
{CKA_MODIFIABLE, 0, 0},
113-
{CKA_ECDSA_PARAMS, 0, 0},
84+
{CKA_NEVER_EXTRACTABLE, 0, 0},
85+
{CKA_PRIVATE, 0, 0},
86+
{CKA_RESET_ON_INIT, 0, 0},
87+
{CKA_SENSITIVE, 0, 0},
88+
{CKA_SIGN, 0, 0},
89+
{CKA_SIGN_RECOVER, 0, 0},
90+
{CKA_TOKEN, 0, 0},
91+
{CKA_TRUSTED, 0, 0},
92+
{CKA_UNWRAP, 0, 0},
93+
{CKA_VERIFY, 0, 0},
94+
{CKA_VERIFY_RECOVER, 0, 0},
95+
{CKA_WRAP, 0, 0},
96+
// PTR: byte[]
97+
{CKA_AC_ISSUER, 0, 0},
98+
{CKA_ATTR_TYPES, 0, 0},
99+
{CKA_BASE, 0, 0},
100+
{CKA_COEFFICIENT, 0, 0},
114101
{CKA_EC_PARAMS, 0, 0},
115102
{CKA_EC_POINT, 0, 0},
103+
{CKA_EXPONENT_1, 0, 0},
104+
{CKA_EXPONENT_2, 0, 0},
105+
{CKA_ID, 0, 0},
106+
{CKA_ISSUER, 0, 0},
107+
{CKA_MODULUS, 0, 0},
108+
{CKA_OBJECT_ID, 0, 0},
109+
{CKA_OWNER, 0, 0},
110+
{CKA_PRIME, 0, 0},
111+
{CKA_PRIME_1, 0, 0},
112+
{CKA_PRIME_2, 0, 0},
113+
{CKA_PRIVATE_EXPONENT, 0, 0},
114+
{CKA_PUBLIC_EXPONENT, 0, 0},
115+
{CKA_SERIAL_NUMBER, 0, 0},
116+
{CKA_SUBJECT, 0, 0},
117+
{CKA_SUBPRIME, 0, 0},
118+
{CKA_VALUE, 0, 0},
119+
// PTR: CK_UTF8CHAR[]
120+
{CKA_APPLICATION, 0, 0},
121+
{CKA_LABEL, 0, 0},
122+
// PTR: CK_DATE
123+
{CKA_START_DATE, 0, 0},
124+
{CKA_END_DATE, 0, 0},
125+
// deprecated
116126
{CKA_SECONDARY_AUTH, 0, 0},
117127
{CKA_AUTH_PIN_FLAGS, 0, 0},
118-
{CKA_HW_FEATURE_TYPE, 0, 0},
119-
{CKA_RESET_ON_INIT, 0, 0},
120-
{CKA_HAS_RESET, 0, 0},
128+
// misc
121129
{CKA_VENDOR_DEFINED, 0, 0},
130+
// keep this at the end to match the impl in getNativeKeyInfo(...)
122131
{CKA_NETSCAPE_DB, 0, 0},
123132
};
124133

test/hotspot/jtreg/TEST.ROOT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ requires.properties= \
8181
vm.compiler2.enabled \
8282
vm.musl \
8383
vm.flagless \
84-
docker.support \
84+
container.support \
8585
jdk.containerized
8686

8787
# Minimum jtreg version

test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 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,6 +39,7 @@
3939
*/
4040
class Compile {
4141
private static final int COMPILE_TIMEOUT = 60;
42+
private static final float timeoutFactor = Float.parseFloat(System.getProperty("test.timeout.factor", "1.0"));
4243

4344
private static final String JAVA_PATH = JDKToolFinder.getJDKTool("java");
4445
private static final String JAVAC_PATH = JDKToolFinder.getJDKTool("javac");
@@ -178,7 +179,8 @@ private static void executeCompileCommand(List<String> command) {
178179
int exitCode;
179180
try {
180181
Process process = builder.start();
181-
boolean exited = process.waitFor(COMPILE_TIMEOUT, TimeUnit.SECONDS);
182+
long timeout = COMPILE_TIMEOUT * (long)timeoutFactor;
183+
boolean exited = process.waitFor(timeout, TimeUnit.SECONDS);
182184
if (!exited) {
183185
process.destroyForcibly();
184186
System.out.println("Timeout: compile command: " + String.join(" ", command));

test/hotspot/jtreg/containers/docker/DockerBasicTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2024, 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
@@ -25,7 +25,7 @@
2525
/*
2626
* @test
2727
* @summary Basic (sanity) test for JDK-under-test inside a docker image.
28-
* @requires docker.support
28+
* @requires container.support
2929
* @library /test/lib
3030
* @modules java.base/jdk.internal.misc
3131
* java.management

0 commit comments

Comments
 (0)