8343483: Remove unnecessary @SuppressWarnings annotations (serviceability)
Reviewed-by: cjplummer
This commit is contained in:
parent
7be77725ea
commit
a5f11b5f77
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -35,8 +35,7 @@ import java.rmi.server.RemoteObject;
|
||||
import java.rmi.server.RemoteRef;
|
||||
|
||||
|
||||
@SuppressWarnings({"deprecation",
|
||||
"serial"}) // Externalizable class w/o no-arg c'tor
|
||||
@SuppressWarnings("serial") // Externalizable class w/o no-arg c'tor
|
||||
public class ProxyRef implements RemoteRef {
|
||||
private static final long serialVersionUID = -6503061366316814723L;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
@ -32,7 +32,7 @@ package javax.management.remote.rmi;
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings({"deprecation", "rawtypes", "unchecked"})
|
||||
@SuppressWarnings({"deprecation", "rawtypes"})
|
||||
public final class RMIServerImpl_Stub
|
||||
extends java.rmi.server.RemoteStub
|
||||
implements javax.management.remote.rmi.RMIServer {
|
||||
|
@ -355,7 +355,6 @@ public class ServerNotifForwarder {
|
||||
//----------------
|
||||
// PRIVATE METHODS
|
||||
//----------------
|
||||
@SuppressWarnings("removal")
|
||||
private Subject getSubject() {
|
||||
return Subject.current();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
@ -445,7 +445,6 @@ public class FileLoginModule implements LoginModule {
|
||||
* @param usePasswdFromSharedState a flag to tell this method whether
|
||||
* to retrieve the password from the sharedState.
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // sharedState used as Map<String,Object>
|
||||
private void attemptAuthentication(boolean usePasswdFromSharedState)
|
||||
throws LoginException {
|
||||
|
||||
|
@ -245,8 +245,7 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent;
|
||||
* @author Mandy Chung
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings({"removal",
|
||||
"doclint:reference"}) // cross-module links
|
||||
@SuppressWarnings("doclint:reference") // cross-module links
|
||||
public class ManagementFactory {
|
||||
// A class with only static fields and methods.
|
||||
private ManagementFactory() {};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -47,7 +47,6 @@ public class BadAttributeValueExpException extends Exception {
|
||||
* @serial A string representation of the attribute that originated this exception.
|
||||
* For example, the string value can be the return of {@code attribute.toString()}.
|
||||
*/
|
||||
@SuppressWarnings("serial") // See handling in constructor and readObject
|
||||
private String val;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -162,7 +162,6 @@ public class MonitorNotification extends javax.management.Notification {
|
||||
/**
|
||||
* @serial Monitor notification observed object.
|
||||
*/
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private ObjectName observedObject = null;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -61,7 +61,6 @@ public class OpenMBeanAttributeInfoSupport
|
||||
/**
|
||||
* @serial The open mbean attribute's <i>open type</i>
|
||||
*/
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private OpenType<?> openType;
|
||||
|
||||
/**
|
||||
@ -565,7 +564,7 @@ public class OpenMBeanAttributeInfoSupport
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings("unchecked")
|
||||
static int compare(Object x, Object y) {
|
||||
return ((Comparable) x).compareTo(y);
|
||||
}
|
||||
@ -938,7 +937,7 @@ public class OpenMBeanAttributeInfoSupport
|
||||
return isValue(this, obj);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"}) // cast to Comparable
|
||||
@SuppressWarnings("unchecked") // cast to Comparable
|
||||
static boolean isValue(OpenMBeanParameterInfo info, Object obj) {
|
||||
if (info.hasDefaultValue() && obj == null)
|
||||
return true;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -58,7 +58,6 @@ public class OpenMBeanParameterInfoSupport
|
||||
/**
|
||||
* @serial The open mbean parameter's <i>open type</i>
|
||||
*/
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private OpenType<?> openType;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -612,7 +612,6 @@ public class TabularDataSupport
|
||||
* @return a collection view ({@code Collection<CompositeData>}) of
|
||||
* the values contained in this {@code TabularDataSupport} instance.
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // historical confusion about the return type
|
||||
public Collection<Object> values() {
|
||||
|
||||
return Util.cast(dataMap.values());
|
||||
@ -648,7 +647,6 @@ public class TabularDataSupport
|
||||
* of the mappings contained in this map.
|
||||
* @see java.util.Map.Entry
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // historical confusion about the return type
|
||||
public Set<Map.Entry<Object,Object>> entrySet() {
|
||||
|
||||
return Util.cast(dataMap.entrySet());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -134,7 +134,6 @@ public class RoleList extends ArrayList<Object> {
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Role> asList() {
|
||||
if (!typeSafe) {
|
||||
if (tainted)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -134,7 +134,6 @@ public class RoleUnresolvedList extends ArrayList<Object> {
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<RoleUnresolved> asList() {
|
||||
if (!typeSafe) {
|
||||
if (tainted)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -1154,7 +1154,6 @@ public class Timer extends NotificationBroadcasterSupport
|
||||
*
|
||||
* @param notification The TimerAlarmClock notification.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
void notifyAlarmClock(TimerAlarmClockNotification notification) {
|
||||
|
||||
TimerNotification timerNotification = null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
@ -221,7 +221,6 @@ public class TableSorter extends DefaultTableModel implements MouseListener {
|
||||
return dataVector.elementAt(row);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void setRow(Vector<?> data, int row) {
|
||||
dataVector.setElementAt(data,row);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
@ -42,7 +42,6 @@ public abstract class XTable extends JTable {
|
||||
|
||||
public XTable () {
|
||||
super();
|
||||
@SuppressWarnings("serial")
|
||||
final TableSorter sorter = new TableSorter();
|
||||
setModel(sorter);
|
||||
sorter.addMouseListenerToHeaderInTable(this);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 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
|
||||
@ -376,7 +376,6 @@ class VirtualMachineImpl extends MirrorImpl
|
||||
}
|
||||
Iterator<?> it = classToBytes.entrySet().iterator();
|
||||
for (int i = 0; it.hasNext(); i++) {
|
||||
@SuppressWarnings("rawtypes")
|
||||
Map.Entry<?, ?> entry = (Map.Entry)it.next();
|
||||
ReferenceTypeImpl refType = (ReferenceTypeImpl)entry.getKey();
|
||||
validateMirror(refType);
|
||||
|
Loading…
Reference in New Issue
Block a user