diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java index 4b09210e9e41..abfb14758fe2 100644 --- a/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java +++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2020, 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 @@ -431,7 +431,7 @@ public void repaintButtons() { } @Override - @SuppressWarnings("deprecation") + @SuppressWarnings("removal") public void mouseReleased(final MouseEvent e) { if (didForwardEvent(e)) return; diff --git a/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java b/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java index c6968c2ebc9d..4e065945ff16 100644 --- a/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java +++ b/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2020, 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 @@ -88,7 +88,7 @@ public static void setDelegateRepaintManager(JComponent component, * or {@code Applet} * @param isRequested the value to set vsyncRequested state to */ - @SuppressWarnings("deprecation") + @SuppressWarnings("removal") public static void setVsyncRequested(Container rootContainer, boolean isRequested) { assert (rootContainer instanceof Applet) || (rootContainer instanceof Window); @@ -105,7 +105,7 @@ public static void setVsyncRequested(Container rootContainer, * @param rootContainer topmost container. Should be either Window or Applet * @return {@code true} if vsync painting is requested for {@code rootContainer} */ - @SuppressWarnings("deprecation") + @SuppressWarnings("removal") public static boolean isVsyncRequested(Container rootContainer) { assert (rootContainer instanceof Applet) || (rootContainer instanceof Window); return Boolean.TRUE == vsyncedMap.get(rootContainer); diff --git a/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java b/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java index 84f17cd18aaf..aaac69d703dd 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2020, 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 @@ -57,7 +57,7 @@ * @author Arthur van Hoff, Kara Kytle, Jan Borgersen * @author Florian Bomers */ -@SuppressWarnings("deprecation") +@SuppressWarnings({"deprecation", "removal"}) public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, LineListener { private static final int BUFFER_SIZE = 16384; // number of bytes written each time to the source data line diff --git a/src/java.desktop/share/classes/java/applet/Applet.java b/src/java.desktop/share/classes/java/applet/Applet.java index f45ed4436196..7a210078edd9 100644 --- a/src/java.desktop/share/classes/java/applet/Applet.java +++ b/src/java.desktop/share/classes/java/applet/Applet.java @@ -59,7 +59,8 @@ * @since 1.0 * @deprecated The Applet API is deprecated, no replacement. */ -@Deprecated(since = "9") +@Deprecated(since = "9", forRemoval = true) +@SuppressWarnings("removal") public class Applet extends Panel { /** diff --git a/src/java.desktop/share/classes/java/applet/AppletContext.java b/src/java.desktop/share/classes/java/applet/AppletContext.java index 4e18a8117783..f870bba829b1 100644 --- a/src/java.desktop/share/classes/java/applet/AppletContext.java +++ b/src/java.desktop/share/classes/java/applet/AppletContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2020, 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 @@ -43,7 +43,8 @@ * @since 1.0 * @deprecated The Applet API is deprecated, no replacement. */ -@Deprecated(since = "9") +@Deprecated(since = "9", forRemoval = true) +@SuppressWarnings("removal") public interface AppletContext { /** diff --git a/src/java.desktop/share/classes/java/applet/AppletStub.java b/src/java.desktop/share/classes/java/applet/AppletStub.java index ee6c43cb5c40..3b7646a8a42c 100644 --- a/src/java.desktop/share/classes/java/applet/AppletStub.java +++ b/src/java.desktop/share/classes/java/applet/AppletStub.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2020, 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 @@ -38,7 +38,8 @@ * @since 1.0 * @deprecated The Applet API is deprecated, no replacement. */ -@Deprecated(since = "9") +@Deprecated(since = "9", forRemoval = true) +@SuppressWarnings("removal") public interface AppletStub { /** diff --git a/src/java.desktop/share/classes/java/applet/AudioClip.java b/src/java.desktop/share/classes/java/applet/AudioClip.java index fd437e744e38..d58a609b9910 100644 --- a/src/java.desktop/share/classes/java/applet/AudioClip.java +++ b/src/java.desktop/share/classes/java/applet/AudioClip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2020, 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 @@ -34,7 +34,7 @@ * @since 1.0 * @deprecated The Applet API is deprecated, no replacement. */ -@Deprecated(since = "9") +@Deprecated(since = "9", forRemoval = true) public interface AudioClip { /** diff --git a/src/java.desktop/share/classes/java/applet/package-info.java b/src/java.desktop/share/classes/java/applet/package-info.java index fd24ce24d940..196b6aa466b2 100644 --- a/src/java.desktop/share/classes/java/applet/package-info.java +++ b/src/java.desktop/share/classes/java/applet/package-info.java @@ -36,7 +36,11 @@ * running applets. For example, the applet context could be a Web browser or an * applet development environment. *
- * The APIs in this package are all deprecated without replacement.
+ * @deprecated. This package has been deprecated and may be removed in
+ * a future version of the Java Platform. There is no replacement.
+ * All of the classes and interfaces in this package have been terminally
+ * deprecated.
+ * Users are advised to migrate their applications to other technologies.
*
* @since 1.0
*/
diff --git a/src/java.desktop/share/classes/java/awt/Component.java b/src/java.desktop/share/classes/java/awt/Component.java
index 98a8cdc03b70..2cd9643e7d17 100644
--- a/src/java.desktop/share/classes/java/awt/Component.java
+++ b/src/java.desktop/share/classes/java/awt/Component.java
@@ -4045,7 +4045,7 @@ protected class FlipBufferStrategy extends BufferStrategy {
* {@code true}.
* @see #createBuffers(int, BufferCapabilities)
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
throws AWTException
{
@@ -8177,7 +8177,7 @@ boolean transferFocus(boolean clearOnFailure) {
return res;
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
final Component getNextFocusCandidate() {
Container rootAncestor = getTraversalRoot();
Component comp = this;
diff --git a/src/java.desktop/share/classes/java/beans/AppletInitializer.java b/src/java.desktop/share/classes/java/beans/AppletInitializer.java
index 1e2a99b357cb..2f01a3822d0f 100644
--- a/src/java.desktop/share/classes/java/beans/AppletInitializer.java
+++ b/src/java.desktop/share/classes/java/beans/AppletInitializer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, 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
@@ -43,7 +43,7 @@
* java.applet package
* documentation for further information.
*/
-@Deprecated(since = "9")
+@Deprecated(since = "9", forRemoval = true)
public interface AppletInitializer {
/**
@@ -73,6 +73,7 @@ public interface AppletInitializer {
* @param bCtxt The BeanContext intended for this Applet, or
* null.
*/
+ @SuppressWarnings("removal")
void initialize(Applet newAppletBean, BeanContext bCtxt);
/**
@@ -84,5 +85,6 @@ public interface AppletInitializer {
*
* @param newApplet The newly instantiated JavaBean
*/
+ @SuppressWarnings("removal")
void activate(Applet newApplet);
}
diff --git a/src/java.desktop/share/classes/java/beans/Beans.java b/src/java.desktop/share/classes/java/beans/Beans.java
index 7cea80926b99..6a933aeff932 100644
--- a/src/java.desktop/share/classes/java/beans/Beans.java
+++ b/src/java.desktop/share/classes/java/beans/Beans.java
@@ -167,7 +167,8 @@ public static Object instantiate(ClassLoader cls, String beanName,
* java.applet package
* documentation for further information.
*/
- @Deprecated(since = "9")
+ @Deprecated(since = "9", forRemoval = true)
+ @SuppressWarnings("removal")
public static Object instantiate(ClassLoader cls, String beanName,
BeanContext beanContext,
AppletInitializer initializer)
@@ -516,7 +517,8 @@ protected Class resolveClass(ObjectStreamClass classDesc)
* Package private support class. This provides a default AppletContext
* for beans which are applets.
*/
-@Deprecated(since = "9")
+@Deprecated(since = "9", forRemoval = true)
+@SuppressWarnings("removal")
class BeansAppletContext implements AppletContext {
Applet target;
Hashtablee
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "removal"})
boolean processKeyBindings(KeyEvent e, boolean pressed) {
if (!SwingUtilities.isValidKeyEventForKeyBindings(e)) {
return false;
@@ -4474,7 +4474,7 @@ boolean rectangleIsObscured(int x,int y,int width,int height)
* return value for this method
* @see #getVisibleRect
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "removal"})
static final void computeVisibleRect(Component c, Rectangle visibleRect) {
Container p = c.getParent();
Rectangle bounds = c.getBounds();
@@ -4643,7 +4643,7 @@ public synchronized VetoableChangeListener[] getVetoableChangeListeners() {
* or null
if not in any container
*/
@BeanProperty(bound = false)
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "removal"})
public Container getTopLevelAncestor() {
for(Container p = this; p != null; p = p.getParent()) {
if(p instanceof Window || p instanceof Applet) {
@@ -5051,7 +5051,7 @@ void setPaintingChild(Component paintingChild) {
this.paintingChild = paintingChild;
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings({"deprecation", "removal"})
void _paintImmediately(int x, int y, int w, int h) {
Graphics g;
Container c;
diff --git a/src/java.desktop/share/classes/javax/swing/JTable.java b/src/java.desktop/share/classes/javax/swing/JTable.java
index 9fbc47be3945..1843a1ff83fe 100644
--- a/src/java.desktop/share/classes/javax/swing/JTable.java
+++ b/src/java.desktop/share/classes/javax/swing/JTable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, 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
@@ -6028,7 +6028,7 @@ public CellEditorRemover(KeyboardFocusManager fm) {
this.focusManager = fm;
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
public void propertyChange(PropertyChangeEvent ev) {
if (!isEditing() || getClientProperty("terminateEditOnFocusLost") != Boolean.TRUE) {
return;
diff --git a/src/java.desktop/share/classes/javax/swing/KeyboardManager.java b/src/java.desktop/share/classes/javax/swing/KeyboardManager.java
index 40cd7aebe4dc..77f5a5ea1f81 100644
--- a/src/java.desktop/share/classes/javax/swing/KeyboardManager.java
+++ b/src/java.desktop/share/classes/javax/swing/KeyboardManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2020, 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
@@ -137,7 +137,7 @@ public void registerKeyStroke(KeyStroke k, JComponent c) {
/**
* Find the top focusable Window, Applet, or InternalFrame
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
private static Container getTopAncestor(JComponent c) {
for(Container p = c.getParent(); p != null; p = p.getParent()) {
if (p instanceof Window && ((Window)p).isFocusableWindow() ||
diff --git a/src/java.desktop/share/classes/javax/swing/PopupFactory.java b/src/java.desktop/share/classes/javax/swing/PopupFactory.java
index 31df7544c0e3..2428e96837b1 100644
--- a/src/java.desktop/share/classes/javax/swing/PopupFactory.java
+++ b/src/java.desktop/share/classes/javax/swing/PopupFactory.java
@@ -275,7 +275,7 @@ else if (popupType == LIGHT_WEIGHT_POPUP &&
* Obtains the appropriate Popup
based on
* popupType
.
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
private Popup getPopup(Component owner, Component contents,
int ownerX, int ownerY, int popupType) {
if (GraphicsEnvironment.isHeadless()) {
@@ -630,7 +630,7 @@ boolean overlappedByOwnedWindow() {
* Returns true if popup can fit the screen and the owner's top parent.
* It determines can popup be lightweight or mediumweight.
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
boolean fitsOnScreen() {
boolean result = false;
Component component = getComponent();
@@ -801,7 +801,7 @@ public void hide() {
recycleLightWeightPopup(this);
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
public void show() {
Container parent = null;
@@ -956,7 +956,7 @@ public void hide() {
recycleMediumWeightPopup(this);
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
public void show() {
Component component = getComponent();
Container parent = null;
diff --git a/src/java.desktop/share/classes/javax/swing/RepaintManager.java b/src/java.desktop/share/classes/javax/swing/RepaintManager.java
index 9615a2722381..95f0479df5d4 100644
--- a/src/java.desktop/share/classes/javax/swing/RepaintManager.java
+++ b/src/java.desktop/share/classes/javax/swing/RepaintManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, 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
@@ -420,7 +420,7 @@ public synchronized void removeInvalidComponent(JComponent component) {
*
* @see JComponent#repaint
*/
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
private void addDirtyRegion0(Container c, int x, int y, int w, int h) {
/* Special cases we don't have to bother with.
*/
@@ -538,12 +538,13 @@ public void addDirtyRegion(Window window, int x, int y, int w, int h) {
* java.applet package
* documentation for further information.
*/
- @Deprecated(since = "9")
+ @Deprecated(since = "9", forRemoval = true)
+ @SuppressWarnings("removal")
public void addDirtyRegion(Applet applet, int x, int y, int w, int h) {
addDirtyRegion0(applet, x, y, w, h);
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("removal")
void scheduleHeavyWeightPaints() {
Map