mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-23 21:04:19 +02:00
8343486: Remove unnecessary @SuppressWarnings annotations and -Xlint:-foo options
Reviewed-by: ihse
This commit is contained in:
parent
0b733e9a22
commit
c799cad1de
13 changed files with 8 additions and 119 deletions
|
@ -23,7 +23,7 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
|
DISABLED_WARNINGS_java += dangling-doc-comments
|
||||||
|
|
||||||
DOCLINT += -Xdoclint:all/protected \
|
DOCLINT += -Xdoclint:all/protected \
|
||||||
'-Xdoclint/package:java.*,javax.*'
|
'-Xdoclint/package:java.*,javax.*'
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
DISABLED_WARNINGS_java += missing-explicit-ctor this-escape
|
DISABLED_WARNINGS_java += this-escape
|
||||||
|
|
||||||
COPY += .ico
|
COPY += .ico
|
||||||
|
|
|
@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,5 +23,4 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
DISABLED_WARNINGS_java += missing-explicit-ctor
|
|
||||||
JAVAC_FLAGS += -XDstringConcat=inline
|
JAVAC_FLAGS += -XDstringConcat=inline
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
DISABLED_WARNINGS_java += dangling-doc-comments this-escape
|
DISABLED_WARNINGS_java += dangling-doc-comments
|
||||||
|
|
||||||
EXCLUDES += \
|
EXCLUDES += \
|
||||||
com/sun/tools/example/debug/bdi \
|
com/sun/tools/example/debug/bdi \
|
||||||
|
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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) ?
|
static final Boolean RUN_DIRECTION_LTR = (jafa == null) ?
|
||||||
Boolean.FALSE : (Boolean)jafa.getTextAttributeConstant("RUN_DIRECTION_LTR");
|
Boolean.FALSE : (Boolean)jafa.getTextAttributeConstant("RUN_DIRECTION_LTR");
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
private static AttributedCharacterIterator.Attribute
|
private static AttributedCharacterIterator.Attribute
|
||||||
getTextAttribute(String name)
|
getTextAttribute(String name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -113,7 +113,6 @@ final class BiClassValue<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private T compute(final VarHandle mapHandle, final Class<?> c, final Function<Class<?>, T> compute) {
|
private T compute(final VarHandle mapHandle, final Class<?> c, final Function<Class<?>, T> compute) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Map<Class<?>, T> map = (Map<Class<?>, T>) mapHandle.getVolatile(this);
|
Map<Class<?>, T> map = (Map<Class<?>, T>) mapHandle.getVolatile(this);
|
||||||
T value;
|
T value;
|
||||||
T newValue = null;
|
T newValue = null;
|
||||||
|
@ -128,7 +127,6 @@ final class BiClassValue<T> {
|
||||||
final Map.Entry<Class<?>, T>[] entries = map.entrySet().toArray(new Map.Entry[map.size() + 1]);
|
final Map.Entry<Class<?>, T>[] entries = map.entrySet().toArray(new Map.Entry[map.size() + 1]);
|
||||||
entries[map.size()] = Map.entry(c, newValue);
|
entries[map.size()] = Map.entry(c, newValue);
|
||||||
final var newMap = Map.ofEntries(entries);
|
final var newMap = Map.ofEntries(entries);
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
final var witness = (Map<Class<?>, T>) mapHandle.compareAndExchange(this, map, newMap);
|
final var witness = (Map<Class<?>, T>) mapHandle.compareAndExchange(this, map, newMap);
|
||||||
if (witness == map) {
|
if (witness == map) {
|
||||||
value = newValue;
|
value = newValue;
|
||||||
|
|
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
// 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
|
// (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.
|
// 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<SingleDynamicMethod> invokables = (List)methods.clone();
|
final List<SingleDynamicMethod> invokables = (List)methods.clone();
|
||||||
invokables.removeAll(subtypingApplicables.getMethods());
|
invokables.removeAll(subtypingApplicables.getMethods());
|
||||||
invokables.removeAll(methodInvocationApplicables.getMethods());
|
invokables.removeAll(methodInvocationApplicables.getMethods());
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
* @deprecated The jdk.jsobject module will be delivered with JavaFX.
|
* @deprecated The jdk.jsobject module will be delivered with JavaFX.
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "24", forRemoval = true)
|
@Deprecated(since = "24", forRemoval = true)
|
||||||
@SuppressWarnings("removal")
|
|
||||||
module jdk.jsobject {
|
module jdk.jsobject {
|
||||||
exports netscape.javascript;
|
exports netscape.javascript;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ package netscape.javascript;
|
||||||
* @deprecated The jdk.jsobject module will be delivered with JavaFX.
|
* @deprecated The jdk.jsobject module will be delivered with JavaFX.
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "24", forRemoval = true)
|
@Deprecated(since = "24", forRemoval = true)
|
||||||
@SuppressWarnings("removal")
|
|
||||||
public class JSException extends RuntimeException {
|
public class JSException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 2778103758223661489L;
|
private static final long serialVersionUID = 2778103758223661489L;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue