Skip to content

Commit 486a468

Browse files
parttimenerdshipilev
authored andcommitted
8307732: build-test-lib is broken
8274345: make build-test-lib is broken 8303922: build-test-lib target is broken Reviewed-by: shade Backport-of: 0da48f19cbebe0730d689cb966b886f6f73fb3f1
1 parent 0ce7d86 commit 486a468

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

make/test/BuildTestLib.gmk

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2023, 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
@@ -36,9 +36,11 @@ TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
3636

3737
$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
3838
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
39-
SRC := $(TEST_LIB_SOURCE_DIR)/sun, \
39+
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/whitebox/, \
4040
BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
4141
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
42+
DISABLED_WARNINGS := deprecation removal preview, \
43+
JAVAC_FLAGS := --enable-preview, \
4244
))
4345

4446
TARGETS += $(BUILD_WB_JAR)
@@ -50,7 +52,14 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
5052
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
5153
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
5254
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
53-
DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast, \
55+
DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview, \
56+
JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
57+
--add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
58+
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
59+
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
60+
--add-exports java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED \
61+
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
62+
--enable-preview, \
5463
))
5564

5665
TARGETS += $(BUILD_TEST_LIB_JAR)

test/lib/jdk/test/lib/hexdump/ASN1Formatter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2023, 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
@@ -303,7 +303,7 @@ private int annotate(DataInputStream in, Appendable out, int available, String p
303303
case TAG_BitString:
304304
out.append(String.format("%s [%d]", tagName(tag), len));
305305
do {
306-
var skipped = in.skip(len);
306+
var skipped = (int) in.skip(len);
307307
len -= skipped;
308308
available -= skipped;
309309
} while (len > 0);

test/lib/jdk/test/lib/net/HttpHeaderParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
import static java.util.Objects.requireNonNull;
3636

37-
public class HttpHeaderParser {
37+
public final class HttpHeaderParser {
3838
private static final char CR = '\r';
3939
private static final char LF = '\n';
4040
private static final char HT = '\t';

0 commit comments

Comments
 (0)