diff --git a/make/modules/java.sql.rowset/Java.gmk b/make/modules/java.sql.rowset/Java.gmk index 9f430a7121b..6bc30e3693d 100644 --- a/make/modules/java.sql.rowset/Java.gmk +++ b/make/modules/java.sql.rowset/Java.gmk @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += dangling-doc-comments this-escape +DISABLED_WARNINGS_java += dangling-doc-comments DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/make/modules/jdk.httpserver/Java.gmk b/make/modules/jdk.httpserver/Java.gmk index 799ff8695a7..95c0f1eb6ab 100644 --- a/make/modules/jdk.httpserver/Java.gmk +++ b/make/modules/jdk.httpserver/Java.gmk @@ -23,6 +23,6 @@ # questions. # -DISABLED_WARNINGS_java += missing-explicit-ctor this-escape +DISABLED_WARNINGS_java += this-escape COPY += .ico diff --git a/make/modules/jdk.jartool/Java.gmk b/make/modules/jdk.jartool/Java.gmk index f9b4538838f..5e06f172070 100644 --- a/make/modules/jdk.jartool/Java.gmk +++ b/make/modules/jdk.jartool/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, 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 @@ -23,5 +23,4 @@ # questions. # -DISABLED_WARNINGS_java += missing-explicit-ctor JAVAC_FLAGS += -XDstringConcat=inline diff --git a/make/modules/jdk.jdi/Java.gmk b/make/modules/jdk.jdi/Java.gmk index 12ec29986b9..6577db98b0a 100644 --- a/make/modules/jdk.jdi/Java.gmk +++ b/make/modules/jdk.jdi/Java.gmk @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += dangling-doc-comments this-escape +DISABLED_WARNINGS_java += dangling-doc-comments EXCLUDES += \ com/sun/tools/example/debug/bdi \ diff --git a/make/modules/jdk.jlink/Java.gmk b/make/modules/jdk.jlink/Java.gmk deleted file mode 100644 index 269a1195b6a..00000000000 --- a/make/modules/jdk.jlink/Java.gmk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 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 -# 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 += this-escape diff --git a/make/modules/jdk.jstatd/Java.gmk b/make/modules/jdk.jstatd/Java.gmk deleted file mode 100644 index 269a1195b6a..00000000000 --- a/make/modules/jdk.jstatd/Java.gmk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 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 -# 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 += this-escape diff --git a/make/modules/jdk.unsupported/Java.gmk b/make/modules/jdk.unsupported/Java.gmk deleted file mode 100644 index fc8b2f832d7..00000000000 --- a/make/modules/jdk.unsupported/Java.gmk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2024, 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 += dangling-doc-comments diff --git a/make/modules/jdk.zipfs/Java.gmk b/make/modules/jdk.zipfs/Java.gmk deleted file mode 100644 index 0771884172f..00000000000 --- a/make/modules/jdk.zipfs/Java.gmk +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) 2024, 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 += dangling-doc-comments - diff --git a/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java b/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java index bfeb0b7e621..9ef6add27df 100644 --- a/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java +++ b/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2024, 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 @@ -4744,7 +4744,6 @@ public class BidiBase { static final Boolean RUN_DIRECTION_LTR = (jafa == null) ? Boolean.FALSE : (Boolean)jafa.getTextAttributeConstant("RUN_DIRECTION_LTR"); - @SuppressWarnings("serial") private static AttributedCharacterIterator.Attribute getTextAttribute(String name) { diff --git a/src/jdk.dynalink/share/classes/jdk/dynalink/BiClassValue.java b/src/jdk.dynalink/share/classes/jdk/dynalink/BiClassValue.java index 0a1b739c493..a1faf464ea6 100644 --- a/src/jdk.dynalink/share/classes/jdk/dynalink/BiClassValue.java +++ b/src/jdk.dynalink/share/classes/jdk/dynalink/BiClassValue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2024, 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 @@ -113,7 +113,6 @@ final class BiClassValue { } private T compute(final VarHandle mapHandle, final Class c, final Function, T> compute) { - @SuppressWarnings("unchecked") Map, T> map = (Map, T>) mapHandle.getVolatile(this); T value; T newValue = null; @@ -128,7 +127,6 @@ final class BiClassValue { final Map.Entry, T>[] entries = map.entrySet().toArray(new Map.Entry[map.size() + 1]); entries[map.size()] = Map.entry(c, newValue); final var newMap = Map.ofEntries(entries); - @SuppressWarnings("unchecked") final var witness = (Map, T>) mapHandle.compareAndExchange(this, map, newMap); if (witness == map) { value = newValue; diff --git a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java index dd771a0ce31..2f3c3315fbf 100644 --- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java +++ b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2024, 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 @@ -151,7 +151,7 @@ class OverloadedDynamicMethod extends DynamicMethod { // This is typical for very generic signatures at call sites. Typical example: call site specifies // (Object, Object), and we have a method whose parameter types are (String, int). None of the JLS applicability // rules will trigger, but we must consider the method, as it can be the right match for a concrete invocation. - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("unchecked") final List invokables = (List)methods.clone(); invokables.removeAll(subtypingApplicables.getMethods()); invokables.removeAll(methodInvocationApplicables.getMethods()); diff --git a/src/jdk.jsobject/share/classes/module-info.java b/src/jdk.jsobject/share/classes/module-info.java index 22ee6576af3..13ec8943a21 100644 --- a/src/jdk.jsobject/share/classes/module-info.java +++ b/src/jdk.jsobject/share/classes/module-info.java @@ -31,7 +31,6 @@ * @deprecated The jdk.jsobject module will be delivered with JavaFX. */ @Deprecated(since = "24", forRemoval = true) -@SuppressWarnings("removal") module jdk.jsobject { exports netscape.javascript; } diff --git a/src/jdk.jsobject/share/classes/netscape/javascript/JSException.java b/src/jdk.jsobject/share/classes/netscape/javascript/JSException.java index 7fe8ad8dd04..fe3fd7190e6 100644 --- a/src/jdk.jsobject/share/classes/netscape/javascript/JSException.java +++ b/src/jdk.jsobject/share/classes/netscape/javascript/JSException.java @@ -33,7 +33,6 @@ package netscape.javascript; * @deprecated The jdk.jsobject module will be delivered with JavaFX. */ @Deprecated(since = "24", forRemoval = true) -@SuppressWarnings("removal") public class JSException extends RuntimeException { private static final long serialVersionUID = 2778103758223661489L;