Skip to content

8344159: Add lint warnings for unnecessary warning suppression #25167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 78 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4fcc612
Track source end positions of declarations that support @SuppressWarn…
archiecobbs Feb 18, 2025
e235228
Add end position for variables coming from variableDeclaratorId().
archiecobbs Feb 18, 2025
daacc44
Fix bug where some warnings didn't have a source file position.
archiecobbs Feb 18, 2025
f5be4ca
Remove no-longer-needed workaround.
archiecobbs Mar 24, 2025
99b3c35
Remove unused code.
archiecobbs Mar 29, 2025
8027224
Merge branch 'JDK-8353221' into JDK-8352731
archiecobbs Mar 29, 2025
0f85a24
Add missing variable decl end position.
archiecobbs Apr 4, 2025
e9931f6
Add new method Log.clear().
archiecobbs Apr 4, 2025
a1108ac
Invoke Log.useSource() before recursing into attribution.
archiecobbs Apr 4, 2025
2344716
Revert accidentally included unrelated changes.
archiecobbs Apr 7, 2025
a9d5845
Reset the DiagnosticHandler stack in clear().
archiecobbs Apr 7, 2025
0127028
Refactoring/cleanup for handling of ending positions.
archiecobbs Apr 8, 2025
f831a10
Add field LintCategory.annotationSuppression.
archiecobbs Apr 8, 2025
0791ff7
Refactor handling of DEPRECATION_ON_IMPORT via new flag Check.importS…
archiecobbs Apr 9, 2025
c491643
Bump copyright.
archiecobbs Apr 9, 2025
5bb0b11
Add "not yet" comment to TEXT_BLOCKS.
archiecobbs Apr 9, 2025
2e68d7a
Small cleanups relating to Log.DiagnosticHandler.
archiecobbs Apr 9, 2025
dc3b98c
Add comment per review suggestion.
archiecobbs Apr 10, 2025
0a9f5e0
Merge branch 'JDK-8354090' into JDK-8348611
archiecobbs Apr 10, 2025
6852ed1
Merge branch 'JDK-8329951' into JDK-8348611
archiecobbs Apr 10, 2025
004cc5f
Merge branch 'JDK-8352731' into JDK-8348611
archiecobbs Apr 10, 2025
20257a5
Merge branch 'JDK-8354071' into JDK-8348611
archiecobbs Apr 10, 2025
0c98da7
Merge branch 'JDK-8350212' into JDK-8348611
archiecobbs Apr 10, 2025
6ff5e73
Merge branch 'JDK-8354216' into JDK-8348611
archiecobbs Apr 10, 2025
de2d3ab
Initial prototype for JDK-8348611.
archiecobbs Apr 10, 2025
7771061
Merge remote-tracking branch 'upstream/master' into JDK-8348611
archiecobbs Apr 11, 2025
e67b47b
Add test for retroactive @SuppressWarnings("dangling-doc-comments") b…
archiecobbs Apr 11, 2025
d0954d4
Remove another unnecessary call to Check.setLint().
archiecobbs Apr 11, 2025
f2bab52
Merge branch 'JDK-8354447' into JDK-8348611
archiecobbs Apr 11, 2025
4d870e0
Revert unintentional change in the behavior of the "dangling-doc-comm…
archiecobbs Apr 11, 2025
fbca756
Update regression test expected output after previous commit.
archiecobbs Apr 11, 2025
d855d51
Remove some obsolete invocations of Check.setLint() and unused imports.
archiecobbs Apr 12, 2025
3f4b5f1
Update ThisEscapeAnalyzer to use LintMapper for Lint calculation.
archiecobbs Apr 12, 2025
f2d2755
Some refactoring & cleanups for ThisEscapeAnalyzer.
archiecobbs Apr 16, 2025
3a6dd76
Some refactoring to make code clearer.
archiecobbs Apr 17, 2025
7c298b4
More cleanups & refactoring.
archiecobbs Apr 22, 2025
d19ad6f
Move LintMapper from "util" to "code" sub-package.
archiecobbs Apr 23, 2025
5f003d1
Update copyrights.
archiecobbs Apr 23, 2025
67ce889
Merge branch 'JDK-8350212' into JDK-8348611
archiecobbs Apr 23, 2025
9394f7e
Merge branch 'master' into JDK-8348611
archiecobbs Apr 24, 2025
3cd938a
Cleanups.
archiecobbs Apr 24, 2025
5ef9606
Refactor ThisEscapeAnalyzer to correct bug in suppression logic.
archiecobbs Apr 28, 2025
b8c3dcd
Merge branch 'JDK-8355753' into JDK-8348611
archiecobbs Apr 28, 2025
ddb0d4e
Update copyrights.
archiecobbs Apr 28, 2025
a356d88
Merge branch 'master' into JDK-8348611 to fix conflict.
archiecobbs May 1, 2025
81a25ca
Merge branch 'master' into JDK-8348611 to fix conflicts.
archiecobbs May 5, 2025
102beb5
Merge branch 'master' into JDK-8348611
archiecobbs May 7, 2025
348cf0e
Merge branch 'master' into JDK-8350212 to fix conflict.
archiecobbs May 9, 2025
563a143
Merge branch 'master' into JDK-8348611
archiecobbs May 10, 2025
338ba2a
Add support for the "suppression" lint category.
archiecobbs May 10, 2025
cb09746
Update copyright years.
archiecobbs May 10, 2025
a63e3d6
Merge branch 'master' into JDK-8348611 to fix conflicts.
archiecobbs May 20, 2025
6859991
Merge branch 'JDK-8348611' into JDK-8344159 to fix conflicts.
archiecobbs May 20, 2025
b10fb8b
Merge branch 'master' into JDK-8355753
archiecobbs May 29, 2025
65e2679
Add additional tests for warnings generated from fields.
archiecobbs May 29, 2025
0122a0e
Merge branch 'master' into JDK-8350212
archiecobbs May 29, 2025
0898c55
Revert TreeInfo.endPos() refactoring except for "bracePos" renaming.
archiecobbs May 30, 2025
f79e35f
Remove extraneous semicolons.
archiecobbs May 30, 2025
67f8cd1
Merge branch 'master' into JDK-8348611 to fix conflict.
archiecobbs May 30, 2025
9a15a63
Merge branch 'JDK-8355753' into JDK-8348611
archiecobbs May 30, 2025
205f77e
Update EndPosTable.replaceTree() to handle a new node equal to null.
archiecobbs May 30, 2025
a62ebc6
Merge branch 'JDK-8350212' into JDK-8348611
archiecobbs May 31, 2025
30602e7
Merge branch 'master' into JDK-8344159
archiecobbs May 31, 2025
661023b
Merge branch 'JDK-8348611' into JDK-8344159
archiecobbs May 31, 2025
6ab327b
Merge branch 'master' into JDK-8348611
archiecobbs May 31, 2025
0660fdc
Merge branch 'JDK-8348611' into JDK-8344159
archiecobbs May 31, 2025
7f062a6
Merge branch 'master' into JDK-8348611 to fix conflicts.
archiecobbs Jun 5, 2025
b3a5140
Merge branch 'JDK-8348611' into JDK-8344159
archiecobbs Jun 5, 2025
2c4d228
Merge branch 'master' into JDK-8348611
archiecobbs Jun 5, 2025
2430a08
Merge branch 'JDK-8348611' into JDK-8344159
archiecobbs Jun 5, 2025
16debaa
Small refactoring to utilize new method Options.isExplicitlyDisabled().
archiecobbs Jun 10, 2025
cde1f5e
Revert PR #24600 (for JDK-8354447) from this branch so it's not a dep…
archiecobbs Jun 13, 2025
24df3a2
Add comment to regression test.
archiecobbs Jun 13, 2025
b7adf7c
Revert regression test change that is no longer necessary.
archiecobbs Jun 13, 2025
5069bf2
Restore behavior when both -Xlint:options and -Xlint:-options are given.
archiecobbs Jun 17, 2025
8dcea70
No need for /nodynamiccopyright/ with this test.
archiecobbs Jun 17, 2025
38febc6
Merge branch 'JDK-8359596' into JDK-8348611
archiecobbs Jun 18, 2025
fa34f6f
Merge branch 'JDK-8348611' into JDK-8344159
archiecobbs Jun 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions make/CompileToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
build/tools/jigsaw \
build/tools/depend, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
DISABLED_WARNINGS := dangling-doc-comments options, \
DISABLED_WARNINGS := dangling-doc-comments options suppression, \
JAVAC_FLAGS := \
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.base/sun.text=ALL-UNNAMED \
Expand Down Expand Up @@ -81,7 +81,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
SRC := $(TOPDIR)/make/jdk/src/classes, \
INCLUDES := build/tools/depend, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
DISABLED_WARNINGS := options, \
DISABLED_WARNINGS := options suppression, \
JAVAC_FLAGS := \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
Expand Down
2 changes: 1 addition & 1 deletion make/GenerateLinkOptData.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $(eval $(call SetupJavaCompilation, CLASSLIST_JAR, \
SMALL_JAVA := false, \
SRC := $(TOPDIR)/make/jdk/src/classes, \
INCLUDES := build/tools/classlist, \
DISABLED_WARNINGS := dangling-doc-comments, \
DISABLED_WARNINGS := dangling-doc-comments suppression, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/classlist_classes, \
JAR := $(SUPPORT_OUTPUTDIR)/classlist.jar, \
))
Expand Down
2 changes: 1 addition & 1 deletion make/JrtfsJar.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ JIMAGE_PKGS := \
# ends up in the image, this will ensure reproducible classes
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
COMPILER := interim, \
DISABLED_WARNINGS := options, \
DISABLED_WARNINGS := options suppression, \
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
SRC := $(TOPDIR)/src/java.base/share/classes, \
EXCLUDE_FILES := module-info.java, \
Expand Down
4 changes: 2 additions & 2 deletions make/modules/java.base/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
# The base module should be built with all warnings enabled. When a
# new warning is added to javac, it can be temporarily added to the
# disabled warnings list.
#
# DISABLED_WARNINGS_java +=

DISABLED_WARNINGS_java += suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.desktop/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape
DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape suppression
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
COPY += .gif .png .wav .txt .xml .css .pf
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.management/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments this-escape suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.naming/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments this-escape suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 2 additions & 0 deletions make/modules/java.prefs/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

################################################################################

DISABLED_WARNINGS_java += suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'

Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.rmi/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += this-escape
DISABLED_WARNINGS_java += this-escape suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.sql.rowset/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments
DISABLED_WARNINGS_java += dangling-doc-comments suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.sql/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments this-escape suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.xml.crypto/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments this-escape suppression

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.xml/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape
DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape suppression
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
javax.xml.transform javax.xml.validation javax.xml.xpath)'
Expand Down
30 changes: 30 additions & 0 deletions make/modules/jdk.attach/Java.gmk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (c) 2025, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

################################################################################

DISABLED_WARNINGS_java += suppression

################################################################################
2 changes: 2 additions & 0 deletions make/modules/jdk.dynalink/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

################################################################################

DISABLED_WARNINGS_java += suppression

CLEAN += .properties

################################################################################
2 changes: 1 addition & 1 deletion make/modules/jdk.internal.le/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments this-escape suppression

COPY += .properties .caps .txt

Expand Down
2 changes: 2 additions & 0 deletions make/modules/jdk.jartool/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

################################################################################

DISABLED_WARNINGS_java += suppression

JAVAC_FLAGS += -XDstringConcat=inline

################################################################################
2 changes: 2 additions & 0 deletions make/modules/jdk.jdeps/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

################################################################################

DISABLED_WARNINGS_java += suppression

COPY += .txt

CLEAN_FILES += $(wildcard \
Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.jfr/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments exports
DISABLED_WARNINGS_java += dangling-doc-comments exports suppression
COPY := .xsd .xml .dtd .ini
JAVAC_FLAGS := -XDstringConcat=inline

Expand Down
2 changes: 2 additions & 0 deletions make/modules/jdk.jlink/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@
# upgrade_files_<module-name>.conf files
COPY += .conf

DISABLED_WARNINGS_java += suppression

################################################################################
2 changes: 1 addition & 1 deletion make/modules/jdk.jpackage/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################

DISABLED_WARNINGS_java += dangling-doc-comments
DISABLED_WARNINGS_java += dangling-doc-comments suppression

COPY += .gif .png .txt .spec .script .prerm .preinst \
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
Expand Down
2 changes: 2 additions & 0 deletions make/modules/jdk.jshell/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

################################################################################

DISABLED_WARNINGS_java += suppression

COPY += .jsh .properties

################################################################################
30 changes: 30 additions & 0 deletions make/modules/jdk.management.agent/Java.gmk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (c) 2025, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

################################################################################

DISABLED_WARNINGS_java += suppression

################################################################################
30 changes: 30 additions & 0 deletions make/modules/jdk.management.jfr/Java.gmk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (c) 2025, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

################################################################################

DISABLED_WARNINGS_java += suppression

################################################################################
2 changes: 1 addition & 1 deletion make/modules/jdk.management/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

################################################################################

DISABLED_WARNINGS_java += this-escape
DISABLED_WARNINGS_java += this-escape suppression

################################################################################
30 changes: 30 additions & 0 deletions make/modules/jdk.naming.rmi/Java.gmk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (c) 2025, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

################################################################################

DISABLED_WARNINGS_java += suppression

################################################################################
2 changes: 1 addition & 1 deletion make/test/BuildFailureHandler.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
BIN := $(FH_SUPPORT)/classes, \
DISABLED_WARNINGS := options serial try this-escape, \
DISABLED_WARNINGS := options serial try this-escape suppression, \
COPY := .properties, \
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
JAR := $(FH_JAR), \
Expand Down
2 changes: 1 addition & 1 deletion make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
CLASSPATH := $(JMH_COMPILE_JARS), \
CREATE_API_DIGEST := true, \
DISABLED_WARNINGS := restricted this-escape processing rawtypes removal cast \
serial preview dangling-doc-comments, \
serial preview dangling-doc-comments suppression, \
SRC := $(MICROBENCHMARK_SRC), \
BIN := $(MICROBENCHMARK_CLASSES), \
JAVAC_FLAGS := \
Expand Down
1 change: 1 addition & 0 deletions make/test/BuildTestLib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ $(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 := suppression, \
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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2025, 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 @@ -412,6 +412,7 @@ public void process(Env<AttrContext> env) {
f.run(compiler.todo, classes);
}
} finally {
compiler.log.reportOutstandingWarnings();
compiler.log.flush();
}
return results;
Expand Down Expand Up @@ -483,8 +484,10 @@ public void process(Env<AttrContext> env) {
}
}
finally {
if (compiler != null)
if (compiler != null) {
compiler.log.reportOutstandingWarnings();
compiler.log.flush();
}
}
return results;
}
Expand Down
Loading