Skip to content

Commit

Permalink
8307732: build-test-lib is broken
Browse files Browse the repository at this point in the history
8274345: make build-test-lib is broken
8303922: build-test-lib target is broken

Reviewed-by: shade
Backport-of: 0da48f19cbebe0730d689cb966b886f6f73fb3f1
  • Loading branch information
parttimenerd authored and shipilev committed Sep 28, 2023
1 parent 0ce7d86 commit 486a468
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
15 changes: 12 additions & 3 deletions make/test/BuildTestLib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2023, 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 @@ -36,9 +36,11 @@ TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib

$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
SRC := $(TEST_LIB_SOURCE_DIR)/sun, \
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/whitebox/, \
BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
DISABLED_WARNINGS := deprecation removal preview, \
JAVAC_FLAGS := --enable-preview, \
))

TARGETS += $(BUILD_WB_JAR)
Expand All @@ -50,7 +52,14 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast, \
DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview, \
JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED \
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
--enable-preview, \
))

TARGETS += $(BUILD_TEST_LIB_JAR)
Expand Down
4 changes: 2 additions & 2 deletions test/lib/jdk/test/lib/hexdump/ASN1Formatter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, 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 @@ -303,7 +303,7 @@ private int annotate(DataInputStream in, Appendable out, int available, String p
case TAG_BitString:
out.append(String.format("%s [%d]", tagName(tag), len));
do {
var skipped = in.skip(len);
var skipped = (int) in.skip(len);
len -= skipped;
available -= skipped;
} while (len > 0);
Expand Down
2 changes: 1 addition & 1 deletion test/lib/jdk/test/lib/net/HttpHeaderParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

import static java.util.Objects.requireNonNull;

public class HttpHeaderParser {
public final class HttpHeaderParser {
private static final char CR = '\r';
private static final char LF = '\n';
private static final char HT = '\t';
Expand Down

1 comment on commit 486a468

@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.