Skip to content

Commit 57115fa

Browse files
author
Andy Herrick
committed
8189198: Add "forRemoval = true" to Applet API deprecations
Reviewed-by: iris, almatvee, kcr, prr
1 parent b8122d6 commit 57115fa

File tree

22 files changed

+73
-59
lines changed

22 files changed

+73
-59
lines changed

src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -431,7 +431,7 @@ public void repaintButtons() {
431431
}
432432

433433
@Override
434-
@SuppressWarnings("deprecation")
434+
@SuppressWarnings("removal")
435435
public void mouseReleased(final MouseEvent e) {
436436
if (didForwardEvent(e)) return;
437437

src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -88,7 +88,7 @@ public static void setDelegateRepaintManager(JComponent component,
8888
* or {@code Applet}
8989
* @param isRequested the value to set vsyncRequested state to
9090
*/
91-
@SuppressWarnings("deprecation")
91+
@SuppressWarnings("removal")
9292
public static void setVsyncRequested(Container rootContainer,
9393
boolean isRequested) {
9494
assert (rootContainer instanceof Applet) || (rootContainer instanceof Window);
@@ -105,7 +105,7 @@ public static void setVsyncRequested(Container rootContainer,
105105
* @param rootContainer topmost container. Should be either Window or Applet
106106
* @return {@code true} if vsync painting is requested for {@code rootContainer}
107107
*/
108-
@SuppressWarnings("deprecation")
108+
@SuppressWarnings("removal")
109109
public static boolean isVsyncRequested(Container rootContainer) {
110110
assert (rootContainer instanceof Applet) || (rootContainer instanceof Window);
111111
return Boolean.TRUE == vsyncedMap.get(rootContainer);

src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
* @author Arthur van Hoff, Kara Kytle, Jan Borgersen
5858
* @author Florian Bomers
5959
*/
60-
@SuppressWarnings("deprecation")
60+
@SuppressWarnings({"deprecation", "removal"})
6161
public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, LineListener {
6262

6363
private long lastPlayCall = 0;

src/java.desktop/share/classes/java/applet/Applet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
* @since 1.0
6161
* @deprecated The Applet API is deprecated, no replacement.
6262
*/
63-
@Deprecated(since = "9")
63+
@Deprecated(since = "9", forRemoval = true)
64+
@SuppressWarnings("removal")
6465
public class Applet extends Panel {
6566

6667
/**

src/java.desktop/share/classes/java/applet/AppletContext.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,8 @@
4343
* @since 1.0
4444
* @deprecated The Applet API is deprecated, no replacement.
4545
*/
46-
@Deprecated(since = "9")
46+
@Deprecated(since = "9", forRemoval = true)
47+
@SuppressWarnings("removal")
4748
public interface AppletContext {
4849

4950
/**

src/java.desktop/share/classes/java/applet/AppletStub.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,8 @@
3838
* @since 1.0
3939
* @deprecated The Applet API is deprecated, no replacement.
4040
*/
41-
@Deprecated(since = "9")
41+
@Deprecated(since = "9", forRemoval = true)
42+
@SuppressWarnings("removal")
4243
public interface AppletStub {
4344

4445
/**

src/java.desktop/share/classes/java/applet/AudioClip.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
3434
* @since 1.0
3535
* @deprecated The Applet API is deprecated, no replacement.
3636
*/
37-
@Deprecated(since = "9")
37+
@Deprecated(since = "9", forRemoval = true)
3838
public interface AudioClip {
3939

4040
/**

src/java.desktop/share/classes/java/applet/package-info.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,11 @@
3636
* running applets. For example, the applet context could be a Web browser or an
3737
* applet development environment.
3838
* <p>
39-
* The APIs in this package are all deprecated without replacement.
39+
* This package has been deprecated and may be removed in
40+
* a future version of the Java Platform. There is no replacement.
41+
* All of the classes and interfaces in this package have been terminally
42+
* deprecated.
43+
* Users are advised to migrate their applications to other technologies.
4044
*
4145
* @since 1.0
4246
*/

src/java.desktop/share/classes/java/awt/Component.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4047,7 +4047,7 @@ protected class FlipBufferStrategy extends BufferStrategy {
40474047
* {@code true}.
40484048
* @see #createBuffers(int, BufferCapabilities)
40494049
*/
4050-
@SuppressWarnings("deprecation")
4050+
@SuppressWarnings("removal")
40514051
protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
40524052
throws AWTException
40534053
{
@@ -8179,7 +8179,7 @@ boolean transferFocus(boolean clearOnFailure) {
81798179
return res;
81808180
}
81818181

8182-
@SuppressWarnings("deprecation")
8182+
@SuppressWarnings("removal")
81838183
final Component getNextFocusCandidate() {
81848184
Container rootAncestor = getTraversalRoot();
81858185
Component comp = this;

src/java.desktop/share/classes/java/beans/AppletInitializer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
4343
* <a href="../applet/package-summary.html"> java.applet package
4444
* documentation</a> for further information.
4545
*/
46-
@Deprecated(since = "9")
46+
@Deprecated(since = "9", forRemoval = true)
4747
public interface AppletInitializer {
4848

4949
/**
@@ -73,6 +73,7 @@ public interface AppletInitializer {
7373
* @param bCtxt The BeanContext intended for this Applet, or
7474
* null.
7575
*/
76+
@SuppressWarnings("removal")
7677
void initialize(Applet newAppletBean, BeanContext bCtxt);
7778

7879
/**
@@ -84,5 +85,6 @@ public interface AppletInitializer {
8485
*
8586
* @param newApplet The newly instantiated JavaBean
8687
*/
88+
@SuppressWarnings("removal")
8789
void activate(Applet newApplet);
8890
}

0 commit comments

Comments
 (0)