--- old/src/java.desktop/share/classes/java/beans/Beans.java 2016-11-17 20:02:13.000000000 +0300
+++ new/src/java.desktop/share/classes/java/beans/Beans.java 2016-11-17 20:02:13.000000000 +0300
@@ -97,8 +97,10 @@
* @exception IOException if an I/O error occurs.
* @since 1.2
*/
-
- public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext) throws IOException, ClassNotFoundException {
+ @SuppressWarnings("deprecation")
+ public static Object instantiate(ClassLoader cls, String beanName,
+ BeanContext beanContext)
+ throws IOException, ClassNotFoundException {
return Beans.instantiate(cls, beanName, beanContext, null);
}
@@ -153,10 +155,18 @@
* object could not be found.
* @exception IOException if an I/O error occurs.
* @since 1.2
+ *
+ * @deprecated It s recommended to use
+ * {@link #instantiate(ClassLoader, String, BeanContext)}, because the
+ * Applet API is deprecated. See the
+ * java.applet package
+ * documentation for further information.
*/
- @SuppressWarnings("deprecation")
- public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer)
- throws IOException, ClassNotFoundException {
+ @Deprecated(since = "9")
+ public static Object instantiate(ClassLoader cls, String beanName,
+ BeanContext beanContext,
+ AppletInitializer initializer)
+ throws IOException, ClassNotFoundException {
InputStream ins;
ObjectInputStream oins = null;
@@ -501,7 +511,7 @@
* Package private support class. This provides a default AppletContext
* for beans which are applets.
*/
-@SuppressWarnings("deprecation")
+@Deprecated(since = "9")
class BeansAppletContext implements AppletContext {
Applet target;
Hashtable imageCache = new Hashtable<>();
@@ -586,7 +596,7 @@
* Package private support class. This provides an AppletStub
* for beans which are applets.
*/
-@SuppressWarnings("deprecation")
+@Deprecated(since = "9")
class BeansAppletStub implements AppletStub {
transient boolean active;
transient Applet target;