From 55d528eb377795983f68089f83fb6c67840933f9 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Thu, 4 Jun 2026 23:07:47 +0000 Subject: [PATCH] 8385660: Audit and remove unnecessary lint categories from $DISABLED_WARNINGS Reviewed-by: erikj, asemenyuk, prr --- make/CompileDemos.gmk | 18 +++++++++--------- make/modules/jdk.internal.le/Java.gmk | 4 +--- make/modules/jdk.jpackage/Java.gmk | 2 -- make/test/BuildMicrobenchmark.gmk | 6 +++--- make/test/BuildTestLib.gmk | 3 +-- 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk index 503edf18e00..ab3545facec 100644 --- a/make/CompileDemos.gmk +++ b/make/CompileDemos.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, 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 @@ -173,41 +173,41 @@ $(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE) $(eval $(call SetupBuildDemo, FileChooserDemo, \ DEMO_SUBDIR := jfc, \ - DISABLED_WARNINGS := rawtypes deprecation unchecked this-escape, \ + DISABLED_WARNINGS := this-escape, \ )) $(eval $(call SetupBuildDemo, SwingSet2, \ DEMO_SUBDIR := jfc, \ EXTRA_COPY_TO_JAR := .java, \ EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \ - DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast this-escape, \ + DISABLED_WARNINGS := rawtypes static serial cast this-escape, \ )) $(eval $(call SetupBuildDemo, Font2DTest, \ - DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast this-escape dangling-doc-comments, \ + DISABLED_WARNINGS := serial dangling-doc-comments, \ DEMO_SUBDIR := jfc, \ )) $(eval $(call SetupBuildDemo, J2Ddemo, \ DEMO_SUBDIR := jfc, \ MAIN_CLASS := java2d.J2Ddemo, \ - DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions this-escape, \ + DISABLED_WARNINGS := cast lossy-conversions this-escape, \ JAR_NAME := J2Ddemo, \ )) $(eval $(call SetupBuildDemo, Metalworks, \ - DISABLED_WARNINGS := rawtypes unchecked this-escape, \ + DISABLED_WARNINGS := this-escape, \ DEMO_SUBDIR := jfc, \ )) $(eval $(call SetupBuildDemo, Notepad, \ - DISABLED_WARNINGS := rawtypes this-escape, \ + DISABLED_WARNINGS := this-escape, \ DEMO_SUBDIR := jfc, \ )) $(eval $(call SetupBuildDemo, Stylepad, \ DEMO_SUBDIR := jfc, \ - DISABLED_WARNINGS := rawtypes unchecked this-escape, \ + DISABLED_WARNINGS := this-escape, \ EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \ EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \ )) @@ -217,7 +217,7 @@ $(eval $(call SetupBuildDemo, SampleTree, \ )) $(eval $(call SetupBuildDemo, TableExample, \ - DISABLED_WARNINGS := rawtypes unchecked deprecation this-escape dangling-doc-comments, \ + DISABLED_WARNINGS := dangling-doc-comments, \ DEMO_SUBDIR := jfc, \ )) diff --git a/make/modules/jdk.internal.le/Java.gmk b/make/modules/jdk.internal.le/Java.gmk index 27c6eaf5f7f..d101f582484 100644 --- a/make/modules/jdk.internal.le/Java.gmk +++ b/make/modules/jdk.internal.le/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2026, 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 @@ -25,8 +25,6 @@ ################################################################################ -DISABLED_WARNINGS_java += dangling-doc-comments this-escape - COPY += .properties .caps .txt ################################################################################ diff --git a/make/modules/jdk.jpackage/Java.gmk b/make/modules/jdk.jpackage/Java.gmk index 1fd4d527217..f36c83d772e 100644 --- a/make/modules/jdk.jpackage/Java.gmk +++ b/make/modules/jdk.jpackage/Java.gmk @@ -25,8 +25,6 @@ ################################################################################ -DISABLED_WARNINGS_java += dangling-doc-comments - COPY += .gif .png .txt .spec .script .prerm .preinst \ .postrm .postinst .list .sh .desktop .copyright .control .plist .template \ .icns .scpt .wxs .wxl .wxi .wxf .ico .bmp .tiff .service .xsl .js diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk index 4946263ef4e..c71ef7c61af 100644 --- a/make/test/BuildMicrobenchmark.gmk +++ b/make/test/BuildMicrobenchmark.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2026, 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 @@ -83,8 +83,8 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \ SMALL_JAVA := false, \ CLASSPATH := $(JMH_COMPILE_JARS), \ CREATE_API_DIGEST := true, \ - DISABLED_WARNINGS := restricted this-escape processing rawtypes removal cast \ - serial preview dangling-doc-comments, \ + DISABLED_WARNINGS := restricted this-escape rawtypes removal cast \ + serial preview, \ SRC := $(MICROBENCHMARK_SRC), \ BIN := $(MICROBENCHMARK_CLASSES), \ JAVAC_FLAGS := \ diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk index dc5e0a9bd64..3668a918ab1 100644 --- a/make/test/BuildTestLib.gmk +++ b/make/test/BuildTestLib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2026, 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 @@ -46,7 +46,6 @@ $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \ 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, \ ))