8157622: Add @Deprecated annotations to the Applet API classes
Reviewed-by: smarks, serb
--- a/jdk/src/java.desktop/share/classes/java/applet/Applet.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/java.desktop/share/classes/java/applet/Applet.java Mon May 23 14:49:42 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, 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
@@ -46,7 +46,13 @@
* @author Arthur van Hoff
* @author Chris Warth
* @since 1.0
+ *
+ * @deprecated The Applet API is deprecated. See the
+ * <a href="package-summary.html"> java.applet package documentation</a>
+ * for further information.
*/
+
+@Deprecated(since = "9")
public class Applet extends Panel {
/**
--- a/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java Mon May 23 14:49:42 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, 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
@@ -44,7 +44,13 @@
*
* @author Arthur van Hoff
* @since 1.0
+ *
+ * @deprecated The Applet API is deprecated. See the
+ * <a href="package-summary.html"> java.applet package documentation</a>
+ * for further information.
*/
+
+@Deprecated(since = "9")
public interface AppletContext {
/**
* Creates an audio clip.
--- a/jdk/src/java.desktop/share/classes/java/applet/AppletStub.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/java.desktop/share/classes/java/applet/AppletStub.java Mon May 23 14:49:42 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, 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
@@ -36,7 +36,13 @@
* @author Arthur van Hoff
* @see java.applet.Applet#setStub(java.applet.AppletStub)
* @since 1.0
+ *
+ * @deprecated The Applet API is deprecated. See the
+ * <a href="package-summary.html"> java.applet package documentation</a>
+ * for further information.
*/
+
+@Deprecated(since = "9")
public interface AppletStub {
/**
* Determines if the applet is active. An applet is active just
--- a/jdk/src/java.desktop/share/classes/java/applet/AudioClip.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/java.desktop/share/classes/java/applet/AudioClip.java Mon May 23 14:49:42 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, 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
@@ -33,7 +33,13 @@
*
* @author Arthur van Hoff
* @since 1.0
+ *
+ * @deprecated The Applet API is deprecated. See the
+ * <a href="package-summary.html">java.applet package documentation</a>
+ * for further information.
*/
+
+@Deprecated(since = "9")
public interface AudioClip {
/**
* Starts playing this audio clip. Each time this method is called,
--- a/jdk/src/java.desktop/share/classes/java/applet/package.html Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/java.desktop/share/classes/java/applet/package.html Mon May 23 14:49:42 2016 -0700
@@ -39,6 +39,11 @@
applets. For example, the applet context could be a Web browser or an applet
development environment.
<p>
+The APIs in this package are all deprecated. Alternative technologies such as Java Web Start
+or installable applications should be used instead. See <a href="http://openjdk.java.net/jeps/289">JEP 289</a>
+and the Oracle White Paper <a href="http://www.oracle.com/technetwork/java/javase/migratingfromapplets-2872444.pdf">
+"Migrating from Java Applets to plugin-free Java technologies"</a> for more information.
+<p>
<!--
<h2>Package Specification</h2>
--- a/jdk/src/java.desktop/share/classes/javax/swing/JApplet.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JApplet.java Mon May 23 14:49:42 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -92,7 +92,13 @@
*
* @author Arnaud Weber
* @since 1.2
+ *
+ * @deprecated The Applet API is deprecated. See the
+ * <a href="../../java/applet/package-summary.html"> java.applet package documentation</a>
+ * for further information.
*/
+
+@Deprecated(since = "9")
@JavaBean(defaultProperty = "JMenuBar", description = "Swing's Applet subclass.")
@SwingContainer(delegate = "getContentPane")
@SuppressWarnings("serial") // Same-version serialization only
--- a/jdk/src/jdk.jsobject/share/classes/jdk/internal/netscape/javascript/spi/JSObjectProvider.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/jdk.jsobject/share/classes/jdk/internal/netscape/javascript/spi/JSObjectProvider.java Mon May 23 14:49:42 2016 -0700
@@ -29,6 +29,7 @@
import netscape.javascript.JSException;
import netscape.javascript.JSObject;
+@SuppressWarnings("deprecation")
public interface JSObjectProvider {
/**
* Return a JSObject for the window containing the given applet.
--- a/jdk/src/jdk.jsobject/share/classes/netscape/javascript/JSObject.java Mon May 23 14:05:57 2016 -0700
+++ b/jdk/src/jdk.jsobject/share/classes/netscape/javascript/JSObject.java Mon May 23 14:49:42 2016 -0700
@@ -52,6 +52,7 @@
* </p>
*
*/
+@SuppressWarnings("deprecation")
public abstract class JSObject {
/**
* Constructs a new JSObject. Users should neither call this method nor