Deprecated API
Contents
- Terminally Deprecated ElementsElementDeprecated inDescription9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.24There is no replacement for this class.9Finalization has been deprecated for removal. See
Object.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.24since JDK 249The Applet API is deprecated. See the java.applet packagedocumentation for further information.23232323232323232323232323232323232323this method will be removed when java.beans.beancontext is removed9It is recommended to useBeans.instantiate(ClassLoader, String, BeanContext),because the Applet API is deprecated. See the java.applet packagedocumentation for further information.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.1.4This method does not write the values contained by thisPutFieldobject in a proper format, and may result in corruption of the serialization stream. The correct way to writePutFielddata is by calling theObjectOutputStream.writeFields()method.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.18Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.9Finalization is deprecated and subject to removal in a futurerelease. The use of finalization can lead to problems with security,performance, and reliability.SeeJEP 421 fordiscussion and alternatives.Subclasses that override
finalizeto perform cleanup should usealternative cleanup mechanisms and remove thefinalizemethod.UseCleanerandPhantomReferenceas safer ways to release resourceswhen an object becomes unreachable. Alternatively, add aclosemethod to explicitly release resources, and implementAutoCloseableto enable use of thetry-with-resourcesstatement.This method will remain in place until finalizers have been removed frommost existing code.
25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.18Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.When running in a JVM in which finalization has been disabled or removed,no objects will be pending finalization, so this method does nothing.
25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.17There is no replacement for this class.17This method originally returnedthe system-wide Security Manager. Setting a Security Manager is no longer supported. There is no replacement for the Security Manager or this method.18Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.When running in a JVM in which finalization has been disabled or removed,no objects will be pending finalization, so this method does nothing.
17This method originally setthe system-wide Security Manager. Setting a Security Manager is no longer supported. There is no replacement for the Security Manager or this method.17This method originally determined if the currently runningthread had permission to modify this thread. This method was only usefulin conjunction withthe Security Manager,which is no longer supported. There is no replacement for the SecurityManager or this method.1.2This method was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath. It was inherently unsafe. Stopping a thread caused it to unlock all of the monitors that it had locked (as a natural consequence of theThreadDeathexception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects became visible to other threads, potentially resulting in arbitrary behavior. Usages ofstopshould be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), theinterruptmethod should be used to interrupt the wait. For more information, seeWhy is Thread.stop deprecated and the ability to stop a thread removed?.20Thread.stop()was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath. It was inherently unsafe and deprecated in an early JDK release. The ability to "stop" a thread withThread.stophas been removed and theThread.stopmethod changed to throw an exception. Consequently,ThreadDeathis also deprecated, for removal.17This method originally determined if the currently runningthread had permission to modify this thread group. This method was onlyuseful in conjunction withthe Security Manager,which is no longer supported. There is no replacement for the SecurityManager or this method.16This method was originally specified to destroy an empty thread group. The ability to explicitly destroy a thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is adaemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is destroyed. The ability to destroy a thread group and the concept of a destroyed thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally configured whether the thread group is adaemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.1.2use getTimeToLive instead.1.2use setTimeToLive instead.25Permissions can no longer be used for controlling access to resourcesas the Security Manager is no longer supported.1.2use theMulticastSocket.getTimeToLive()method instead,which returns anint instead of abyte.1.4Use the following code or its equivalent instead:...... int ttl = mcastSocket.getOption(StandardSocketOptions.IP_MULTICAST_TTL); mcastSocket.setOption(StandardSocketOptions.IP_MULTICAST_TTL, newttl); mcastSocket.send(p); mcastSocket.setOption(StandardSocketOptions.IP_MULTICAST_TTL, ttl); ......1.2use theMulticastSocket.setTimeToLive(int)method instead, which usesint instead ofbyte as the type for ttl.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.1.1Thestreamparameter provided a way in early JDK releases to create aSocketthat used a datagram socket. This feature no longer exists. Instead useDatagramSocketfor datagram sockets.1.1Thestreamparameter provided a way in early JDK releases to create aSocketthat used a datagram socket. This feature no longer exists. Instead useDatagramSocketfor datagram sockets.25Permissions can no longer be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.1.8There is no replacement for the Security Manager.17This class was only useful in conjunction with thethe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.17This exception was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.cert.Certificateand related classes.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore, thejava.security.certpackage, andjava.security.Principal.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore, thejava.security.certpackage, andjava.security.Principal.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. Installing a system-widePolicyobject is no longer supported. ThesetPolicy method has been changed to always throwUnsupportedOperationException. ThegetPolicy method has been changed to always return aPolicyobject that grants no permissions. There is no replacement for the Security Manager or this class.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore, thejava.security.certpackage, andjava.security.Principal.25This permission cannot be used for controlling access to resources as the Security Manager is no longer supported.17This method originally returned aCallableobject that when called, executed the givencallableunder the current access control context. Access control contexts were only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.17This method originally returned aCallableobject that when called, executed the givencallableunder the current access control context, with the current context class loader as the context class loader. Access control contexts were only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.17This method originally returned a thread factory that created new threads that had the same access control context as the current thread. Access control contexts were only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.17This method originally checked that the current context wastrusted to modify the logging configuration. This method was only usefulin conjunction withthe Security Manager,which is no longer supported. There is no replacement for the SecurityManager or this method.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.24ZipError is no longer used and is obsolete.ZipExceptionshould be used instead.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.25This class was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for this class.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.25This constructor exists for historical reasons. Ifreading from XML is required, it should be implemented externally.25This method exists for historical reasons. Ifwriting to XML is required, it should be implemented externally.25This class exists only to support XML parsing implemented privately in this module,in DescriptorSupport. That feature is deprecated for removal.1621This method supported the legacy Subject Delegation feature,which has been removed. There is no replacement.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.9TheHandshakeCompletedEvent.getPeerCertificates()method that returns an array ofjava.security.cert.Certificateshould be used instead.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.9TheSSLSession.getPeerCertificates()method that returns an array ofjava.security.cert.Certificateshould be used instead.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.18This method originally performed the specifiedPrivilegedActionwith privileges enabled. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.18This method originally performed the specifiedPrivilegedExceptionActionwith privileges enabled. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.17This method originally performed the specifiedPrivilegedActionwith privileges enabled and restricted by the specifiedAccessControlContext. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to ignore theAccessControlContextand launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.17This method originally performed the specifiedPrivilegedExceptionActionwith privileges enabled and restricted by the specifiedAccessControlContext. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to ignore theAccessControlContextand launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.17This method used to get the subject associated with the providedAccessControlContext, which was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to always throwUnsupportedOperationException. A replacement API namedSubject.current()has been added which can be used to obtain the current subject. There is no replacement for the Security Manager.17This class was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.24There is no replacement for this class.9The Applet API is deprecated, no replacement.24since JDK 2417Obsolete method, not used anymore.17Obsolete method, not used anymore.17Obsolete method, not used anymore.171717171717It is recommended thatBasicToolBarUI.createFloatingWindow(JToolBar)be used instead9The Applet API is deprecated. See the java.applet packagedocumentation for further information.
- Deprecated InterfacesInterfaceDeprecated inDescription9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated. See the java.applet packagedocumentation for further information.2323232323232323232323no replacementno replacementno replacement.No replacement. This interface is unused and is obsolete.no replacement. Skeletons are no longer required for remotemethod calls in the Java 2 platform v1.2 and greater.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced by
java.security.cert.Certificateand related classes.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.9LoggingMXBeanis no longer aplatform MXBeanand is replacedwithPlatformLoggingMXBean.It will not register in the platformMBeanServer.UseManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)instead.9This interface has been deprecated. See theObservableclass for further information.1.5This interface has been replaced by the SAX2Attributesinterface, which includes Namespace support.1.5This interface has been replaced by the SAX2ContentHandlerinterface, which includes Namespace support.1.5This interface has been replaced by the SAX2XMLReaderinterface, which includes Namespace support.
- Deprecated ClassesClassDeprecated inDescription9The Applet API is deprecated, no replacement.24There is no replacement for this class.9It is recommended that
AWTEventand its subclasses be used instead2323232323232325This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via theStringReaderclass.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.17There is no replacement for this class.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.1.8There is no replacement for the Security Manager.no replacementno replacementStatically generated stubs are deprecated, sincestubs are generated dynamically. SeeUnicastRemoteObjectfor information about dynamic stub generation.17This class was only useful in conjunction with thethe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore, thejava.security.certpackage, andjava.security.Principal.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore, thejava.security.certpackage, andjava.security.Principal.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. Installing a system-widePolicyobject is no longer supported. ThesetPolicy method has been changed to always throwUnsupportedOperationException. ThegetPolicy method has been changed to always return aPolicyobject that grants no permissions. There is no replacement for the Security Manager or this class.17This class was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore, thejava.security.certpackage, andjava.security.Principal.25This permission cannot be used for controlling access to resources as the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.9This class and theObserverinterface have been deprecated.The event model supported byObserverandObservableis quite limited, the order of notifications delivered byObservableis unspecified, and state changes are not inone-for-one correspondence with notifications.For a richer event model, consider using thejava.beanspackage. For reliable and orderedmessaging among threads, consider using one of the concurrent datastructures in thejava.util.concurrentpackage.For reactive streams style programming, see theFlowAPI.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.This class is deprecated as of version 1.3 of the Java PlatformUseMBeanServer.getClassLoaderRepository()instead.UseMBeanServer.getClassLoaderRepository()instead.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.25This class was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for this class.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.25This class was only useful in conjunction with the Security Manager,which is no longer supported. There is no replacement for this class.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.25This permission cannot be used for controlling access to resourcesas the Security Manager is no longer supported.17This class was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.24There is no replacement for this class.9The Applet API is deprecated, no replacement.This class is no longer used or needed.java.awt.Component.AccessibleAWTComponentprovidesthe same functionality and it is handled inComponent.1717171717As of Java 2 platform v1.4.9As of JDK version 9. Obsolete class.9As of JDK version 9. Obsolete class.A table cell can now be any View implementation.1.5This class works with the deprecatedDocumentHandlerinterface. It has been replaced by the SAX2DefaultHandlerclass.1.5This class implements a deprecated interface,AttributeList; that interface has been replaced byAttributes, which is implemented in theAttributesImplhelper class.1.5This class works with the deprecatedParserinterface.9It is recommended to useSAXParserFactoryinstead.
- Deprecated Exception ClassesException ClassDeprecated inDescription20
Thread.stop()was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath. It was inherently unsafe and deprecated in an early JDK release. The ability to "stop" a thread withThread.stophas been removed and theThread.stopmethod changed to throw an exception. Consequently,ThreadDeathis also deprecated, for removal.UseSecurityExceptioninstead.Application code should never directly reference this class, andRMISecurityManagerno longer throws this subclass ofjava.lang.SecurityException.no replacement. Skeletons are no longer required for remotemethod calls in the Java 2 platform v1.2 and greater.no replacement. Skeletons are no longer required for remotemethod calls in the Java 2 platform v1.2 and greater.This class is obsolete. UseExportExceptioninstead.no replacement17This exception was only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.24ZipError is no longer used and is obsolete.ZipExceptionshould be used instead.25This class exists only to support XML parsing implemented privately in this module,in DescriptorSupport. That feature is deprecated for removal.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.9Use the classes injava.security.certinstead.
- Deprecated FieldsFieldDeprecated inDescriptionAs of JDK version 1.7, the
Cursor.getPredefinedCursor(int)method should be used instead.as of 1.3. UseDataFlavor.getReaderForText(Transferable)instead ofTransferable.getTransferData(DataFlavor.plainTextFlavor).9It is recommended that ALT_GRAPH_DOWN_MASK andInputEvent.getModifiersEx()be used instead9It is recommended that ALT_DOWN_MASK andInputEvent.getModifiersEx()be used instead9It is recommended that BUTTON1_DOWN_MASK andInputEvent.getModifiersEx()be used instead9It is recommended that BUTTON2_DOWN_MASK andInputEvent.getModifiersEx()be used instead. Note that BUTTON2_MASK has the same value as ALT_MASK.9It is recommended that BUTTON3_DOWN_MASK andInputEvent.getModifiersEx()be used instead. Note that BUTTON3_MASK has the same value as META_MASK.9It is recommended that CTRL_DOWN_MASK andInputEvent.getModifiersEx()be used instead9It is recommended that META_DOWN_MASK andInputEvent.getModifiersEx()be used instead9It is recommended that SHIFT_DOWN_MASK andInputEvent.getModifiersEx()be used insteadreplaced byCursor.CROSSHAIR_CURSOR.replaced byCursor.DEFAULT_CURSOR.replaced byCursor.E_RESIZE_CURSOR.replaced byCursor.HAND_CURSOR.replaced byCursor.MOVE_CURSOR.replaced byCursor.N_RESIZE_CURSOR.replaced byCursor.NE_RESIZE_CURSOR.replaced byCursor.NW_RESIZE_CURSOR.replaced byCursor.S_RESIZE_CURSOR.replaced byCursor.SE_RESIZE_CURSOR.replaced byCursor.SW_RESIZE_CURSOR.replaced byCursor.TEXT_CURSOR.replaced byCursor.W_RESIZE_CURSOR.replaced byCursor.WAIT_CURSOR.17This field predates the general-purpose exceptionchaining facility. TheThrowable.getCause()method isnow the preferred means of obtaining this information.1.5Instead ofSURROGATES_AREA, useCharacter.UnicodeBlock.HIGH_SURROGATES,Character.UnicodeBlock.HIGH_PRIVATE_USE_SURROGATES, andCharacter.UnicodeBlock.LOW_SURROGATES.These constants match the block definitions of the Unicode Standard.TheCharacter.UnicodeBlock.of(char)andCharacter.UnicodeBlock.of(int)methods return thestandard constants.9UseRoundingMode.CEILINGinstead.9UseRoundingMode.DOWNinstead.9UseRoundingMode.FLOORinstead.9UseRoundingMode.HALF_DOWNinstead.9UseRoundingMode.HALF_EVENinstead.9UseRoundingMode.HALF_UPinstead.9UseRoundingMode.UNNECESSARYinstead.9UseRoundingMode.UPinstead.it is misplaced and shouldn't have existed.AserialVersionUIDfield in an interface is ineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface is ineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.19This field uses the default values defined in the PKCS #1 standard. Some of these defaults are no longer recommended due to advances in cryptanalysis -- see thePKCS#1 v2.2 standard for more details. Thus, it is recommended to create a newPSSParameterSpecwith the desired parameter values using thePSSParameterSpec(String, String, AlgorithmParameterSpec, int, int)constructor.Extension mechanism is no longer supported.Extension mechanism is no longer supported.Extension mechanism is no longer supported.Initialization of this field is prone to deadlocks.The field must be initialized by the Logger class initializationwhich may cause deadlocks with the LogManager class initialization.In such cases two class initialization wait for each other to complete.The preferred way to get the global logger object is via the callLogger.getGlobal().For compatibility with old JDK versions where theLogger.getGlobal()is not available use the callLogger.getLogger(Logger.GLOBAL_LOGGER_NAME)orLogger.getLogger("global").AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.19This field uses the default values defined in the PKCS #1 standard. Some of these defaults are no longer recommended due to advances in cryptanalysis -- seeAppendix B.1 of PKCS #1 for more details. Thus, it is recommended to create a newOAEPParameterSpecwith the desired parameter values using theOAEPParameterSpec(String, String, AlgorithmParameterSpec, PSource)constructor.Instead of using this field, directly createthe equivalent array{ ImageInputStream.class }.Instead of using this field, directly createthe equivalent array{ ImageOutputStream.class }.equivalent toMonitor.alreadyNotifieds[0].No replacement.UseALLOWED_CLASSNAMES_LISTinstead.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.AserialVersionUIDfield in an interface isineffectual. Do not use; no replacement.Because this field is final (it is part of an interface), its value cannot be changed.since 1.8since 1.8As of Java 2 platform v1.3As of 1.3.As of 1.3.As of 1.3.As of 1.3.As of 1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.as of Java 2 platform v1.3As of 1.3, value comes from UIManager UIManager property FormView.resetButtonTextAs of 1.3, value now comes from UIManager property FormView.submitButtonText
- Deprecated MethodsMethodDeprecated inDescriptionreplaced by
addLayoutComponent(Component, Object).replaced byaddLayoutComponent(Component, Object).As of JDK version 1.1,replaced bygetSelectedCheckbox().As of JDK version 1.1,replaced bysetSelectedCheckbox(Checkbox).As of JDK version 1.1,replaced bygetItemCount().As of JDK version 1.1,should register this component as ActionListener on componentwhich fires action events.As of JDK version 1.1,replaced bygetBounds().As of JDK version 1.1,replaced bydispatchEvent(AWTEvent e).As of JDK version 1.1,replaced bysetEnabled(boolean).As of JDK version 1.1,replaced bysetEnabled(boolean).As of JDK version 1.1,replaced bysetEnabled(boolean).As of JDK version 1.1,replaced by processFocusEvent(FocusEvent).As of JDK version 1.1replaced by processEvent(AWTEvent).As of JDK version 1.1,replaced bysetVisible(boolean).As of JDK version 1.1,replaced by contains(int, int).As of 1.4, replaced byisFocusable().As of JDK version 1.1,replaced by processKeyEvent(KeyEvent).As of JDK version 1.1,replaced by processKeyEvent(KeyEvent).As of JDK version 1.1,replaced bydoLayout().As of JDK version 1.1,replaced by getComponentAt(int, int).As of JDK version 1.1,replaced bygetLocation().As of JDK version 1.1,replaced by processFocusEvent(FocusEvent).As of JDK version 1.1,replaced bygetMinimumSize().As of JDK version 1.1,replaced by processMouseEvent(MouseEvent).As of JDK version 1.1,replaced by processMouseMotionEvent(MouseEvent).As of JDK version 1.1,replaced by processMouseEvent(MouseEvent).As of JDK version 1.1,replaced by processMouseEvent(MouseEvent).As of JDK version 1.1,replaced by processMouseMotionEvent(MouseEvent).As of JDK version 1.1,replaced by processMouseEvent(MouseEvent).As of JDK version 1.1,replaced bysetLocation(int, int).As of JDK version 1.1,replaced by transferFocus().As of JDK version 1.1,replaced by dispatchEvent(AWTEvent).As of JDK version 1.1,replaced bygetPreferredSize().As of JDK version 1.1,replaced bysetBounds(int, int, int, int).As of JDK version 1.1,replaced bysetSize(int, int).As of JDK version 1.1,replaced bysetSize(Dimension).As of JDK version 1.1,replaced bysetVisible(boolean).As of JDK version 1.1,replaced bysetVisible(boolean).As of JDK version 1.1,replaced bygetSize().As of J2SE 1.4, useComponentOrientation.getOrientation(java.util.Locale).As of JDK version 1.1,replaced by getComponentCount().As of JDK version 1.1,replaced bydispatchEvent(AWTEvent e)As of JDK version 1.1,replaced bygetInsets().As of JDK version 1.1,replaced bydoLayout().As of JDK version 1.1,replaced bygetComponentAt(int, int).As of JDK version 1.1,replaced bygetMinimumSize().As of JDK version 1.1,replaced bygetPreferredSize().As inconsistent withhashCode()contract, useDataFlavor.isMimeTypeEqual(String)instead.This method is never invoked by this implementation from 1.1 onwardsThis method is never invoked by this implementation from 1.1 onwardsAs of JDK version 1.5, replaced bysetVisible(boolean).As of JDK version 1.5, replaced bysetVisible(boolean).9It is recommended that extended modifier keys andInputEvent.getModifiersEx()be used instead9It is recommended that extended modifier keys andInputEvent.getModifiersExText(int)be used insteadas of JDK1.1.4As of JDK version 1.1.1,replaced bygetMaxDescent().As of JDK version 1.1,replaced byComponent.getCursor().As of JDK version 1.1,replaced byComponent.setCursor(Cursor).9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.As of JDK version 1.1,replaced bygetClipBounds().replaced byconcatenateTransform(AffineTransform).replaced bypreConcatenateTransform(AffineTransform).replaced byadd(String).replaced byadd(String, int).As of JDK version 1.1,replaced byisMultipleMode().As of JDK version 1.1,replaced byremoveAll().As of JDK version 1.1,replaced bygetItemCount().replaced byremove(String)andremove(int).As of JDK version 1.1,Not for public use in the future.This method is expected to be retained only as a packageprivate method.As of JDK version 1.1,replaced byisIndexSelected(int).As of JDK version 1.1,replaced bygetMinimumSize().As of JDK version 1.1,replaced bygetMinimumSize(int).As of JDK version 1.1,replaced bygetPreferredSize().As of JDK version 1.1,replaced bygetPreferredSize(int).As of JDK version 1.1,replaced bysetMultipleMode(boolean).As of JDK version 1.1,replaced bygetItemCount().As of JDK version 1.1,replaced bygetMenuCount().As of JDK version 1.1, replaced bydispatchEvent.As of JDK version 1.1replaced by dispatchEvent(AWTEvent).As of JDK version 1.1,replaced bysetEnabled(boolean).As of JDK version 1.1,replaced bysetEnabled(boolean).As of JDK version 1.1,replaced bysetEnabled(boolean).As of JDK version 1.1,replaced bygetBounds().As of JDK version 1.1,replaced bycontains(int, int).9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.As of JDK version 1.1,replaced bycontains(int, int).As of JDK version 1.1,replaced bysetLocation(int, int).As of JDK version 1.1,replaced bysetBounds(int, int, int, int).As of JDK version 1.1,replaced bysetSize(int, int).As of JDK version 1.1,replaced bygetUnitIncrement().As of JDK version 1.1,replaced bygetBlockIncrement().As of JDK version 1.1,replaced bygetVisibleAmount().As of JDK version 1.1,replaced bysetUnitIncrement(int).As of JDK version 1.1,replaced bysetBlockIncrement().As of JDK version 1.1,replaced bydoLayout().As of JDK version 1.1,replaced byappend(String).As of JDK version 1.1,replaced byinsert(String, int).As of JDK version 1.1,replaced bygetMinimumSize().As of JDK version 1.1,replaced bygetMinimumSize(int, int).As of JDK version 1.1,replaced bygetPreferredSize().As of JDK version 1.1,replaced bygetPreferredSize(int, int).As of JDK version 1.1,replaced byreplaceRange(String, int, int).As of JDK version 1.1,replaced bygetMinimumSize().As of JDK version 1.1,replaced bygetMinimumSize(int).As of JDK version 1.1,replaced bygetPreferredSize().As of JDK version 1.1,replaced bygetPreferredSize(int).As of JDK version 1.1,replaced bysetEchoChar(char).As of JDK version 1.2, replaced by theFontmethodgetLineMetrics.10It is recommended that extended modifier keys andToolkit.getMenuShortcutKeyMaskEx()be used insteadAs of J2SE 1.4, replaced byComponent.applyComponentOrientation.As of J2SE 1.4, replaced byComponent.applyComponentOrientation.24since JDK 24As of JDK version 1.5, replaced byWindow.setVisible(boolean).As of JDK version 1.1replaced bydispatchEvent(AWTEvent).As of JDK version 1.1,replaced bysetBounds(int, int, int, int).As of JDK version 1.5, replaced byWindow.setVisible(boolean).23this method will be removed when java.beans.beancontext is removed9It is recommended to useBeans.instantiate(ClassLoader, String, BeanContext),because the Applet API is deprecated. See the java.applet packagedocumentation for further information.This method does not properly convert bytes into characters.As of JDK 1.1, the preferred way to do this is via theByteArrayOutputStream.toString(String charsetName)orByteArrayOutputStream.toString(Charset charset)method, which takes an encoding-name or charset argument,or thetoString()method, which uses the default charset.This method does not properly convert bytes to characters.As of JDK 1.1, the preferred way to read lines of text is via theBufferedReader.readLine()method. Programs that use theDataInputStreamclass to read lines can be converted to usetheBufferedReaderclass by replacing code of the form:
with:DataInputStream d = new DataInputStream(in);
BufferedReader d = new BufferedReader(new InputStreamReader(in));
This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.1.4This method does not write the values contained by thisPutFieldobject in a proper format, and may result in corruption of the serialization stream. The correct way to writePutFielddata is by calling theObjectOutputStream.writeFields()method.1.1Replaced by isJavaIdentifierStart(char).1.1Replaced by isJavaIdentifierPart(char).1.1Replaced by isWhitespace(char).9This method propagates any exception thrown by thenullary constructor, including a checked exception. Use ofthis method effectively bypasses the compile-time exceptionchecking that would otherwise be performed by the compiler.TheConstructor.newInstancemethod avoids this problem by wrappingany exception thrown by the constructor in a (checked)InvocationTargetException.The call
can be replaced byclazz.newInstance()The latter sequence of calls is inferred to be able to throwthe additional exception typesclazz.getDeclaredConstructor().newInstance()InvocationTargetExceptionandNoSuchMethodException. Both of these exception types aresubclasses ofReflectiveOperationException.1.1Replaced bydefineClass(String, byte[], int, int)9If multiple class loaders delegate to each other and define classeswith the same package name, and one such loader relies on the lookupbehavior ofgetPackageto return aPackagefroma parent loader, then the properties exposed by thePackagemay not be as expected in the rest of the program.For example, thePackagewill only expose annotations from thepackage-info.classfile defined by the parent loader, even ifannotations exist in apackage-info.classfile defined bya child loader. A more robust approach is to use theClassLoader.getDefinedPackage(String)method which returnsaPackagefor the specified class loader.18Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.14This method was originally designed to testPRIVATEaccessthat implies full privilege access butMODULEaccess has since becomeindependent ofPRIVATEaccess. It is recommended to callMethodHandles.Lookup.hasFullPrivilegeAccess()instead.18Finalization has been deprecated for removal. SeeObject.finalize()for details.9Finalization is deprecated and subject to removal in a futurerelease. The use of finalization can lead to problems with security,performance, and reliability.SeeJEP 421 fordiscussion and alternatives.Subclasses that override
finalizeto perform cleanup should usealternative cleanup mechanisms and remove thefinalizemethod.UseCleanerandPhantomReferenceas safer ways to release resourceswhen an object becomes unreachable. Alternatively, add aclosemethod to explicitly release resources, and implementAutoCloseableto enable use of thetry-with-resourcesstatement.This method will remain in place until finalizers have been removed frommost existing code.
9If multiple class loaders delegate to each other and define classeswith the same package name, and one such loader relies on the lookupbehavior ofgetPackageto return aPackagefroma parent loader, then the properties exposed by thePackagemay not be as expected in the rest of the program.For example, thePackagewill only expose annotations from thepackage-info.classfile defined by the parent loader, even ifannotations exist in apackage-info.classfile defined bya child loader. A more robust approach is to use theClassLoader.getDefinedPackage(String)method which returnsaPackagefor the specified class loader.16This method was originally specified to test if a reference object hasbeen cleared and enqueued but was never implemented to do this test.This method could be misused due to the inherent race conditionor without an associatedReferenceQueue.An application relying on this method to release critical resourcescould cause serious performance issue.An application should useReferenceQueueto reliably determinewhat reference objects that have been enqueued orrefersTo(null)to determine if this referenceobject has been cleared.9This method is deprecated because its name hints that it checksif the reflected object is accessible when it actually indicatesif the checks for Java language access control are suppressed.This method may returnfalseon a reflected object that isaccessible to the caller. To test if this reflected object is accessible,it should useAccessibleObject.canAccess(Object).Proxy classes generated in a named module are encapsulated and not accessible to code outside its module.Constructor.newInstancewill throwIllegalAccessExceptionwhen it is called on an inaccessible proxy class. UseProxy.newProxyInstance(ClassLoader, Class[], InvocationHandler)to create a proxy instance instead.18This method is error-prone and should not be used, the corresponding methodRuntime.exec(String[])orProcessBuildershould be used instead.The command string is broken into tokens using only whitespace characters.For an argument with an embedded space, such as a filename, this can cause problemsas the token does not include the full filename.18This method is error-prone and should not be used, the corresponding methodRuntime.exec(String[], String[])orProcessBuildershould be used instead.The command string is broken into tokens using only whitespace characters.For an argument with an embedded space, such as a filename, this can cause problemsas the token does not include the full filename.18This method is error-prone and should not be used, the corresponding methodRuntime.exec(String[], String[], File)orProcessBuildershould be used instead.The command string is broken into tokens using only whitespace characters.For an argument with an embedded space, such as a filename, this can cause problemsas the token does not include the full filename.18Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.When running in a JVM in which finalization has been disabled or removed,no objects will be pending finalization, so this method does nothing.
10As of Java SE 10, the first element of a versionnumber is not the major-release number but the feature-releasecounter, incremented for every time-based release. Use theRuntime.Version.feature()method in preference to this method. For compatibility,this method returns the value of thefeatureelement.10As of Java SE 10, the second element of a versionnumber is not the minor-release number but the interim-releasecounter, incremented for every interim release. Use theRuntime.Version.interim()method in preference to this method. For compatibility,this method returns the value of theinterimelement, or zero if it is absent.10As of Java SE 10, the third element of a versionnumber is not the security level but the update-release counter,incremented for every update release. Use theRuntime.Version.update()method in preference to this method. For compatibility, this methodreturns the value of theupdate element, orzero if it is absent.1.1This method does not properly convert characters intobytes. As of JDK 1.1, the preferred way to do this is via theString.getBytes()method, which uses thedefault charset.17This method originally returnedthe system-wide Security Manager. Setting a Security Manager is no longer supported. There is no replacement for the Security Manager or this method.18Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.When running in a JVM in which finalization has been disabled or removed,no objects will be pending finalization, so this method does nothing.
17This method originally setthe system-wide Security Manager. Setting a Security Manager is no longer supported. There is no replacement for the Security Manager or this method.17This method originally determined if the currently runningthread had permission to modify this thread. This method was only usefulin conjunction withthe Security Manager,which is no longer supported. There is no replacement for the SecurityManager or this method.19This method is not final and may be overridden to return avalue that is not the thread ID. UseThread.threadId()instead.1.2This method was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath. It was inherently unsafe. Stopping a thread caused it to unlock all of the monitors that it had locked (as a natural consequence of theThreadDeathexception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects became visible to other threads, potentially resulting in arbitrary behavior. Usages ofstopshould be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), theinterruptmethod should be used to interrupt the wait. For more information, seeWhy is Thread.stop deprecated and the ability to stop a thread removed?.17This method originally determined if the currently runningthread had permission to modify this thread group. This method was onlyuseful in conjunction withthe Security Manager,which is no longer supported. There is no replacement for the SecurityManager or this method.16This method was originally specified to destroy an empty thread group. The ability to explicitly destroy a thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is adaemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is destroyed. The ability to destroy a thread group and the concept of a destroyed thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally configured whether the thread group is adaemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.9The methodBigDecimal.divide(BigDecimal, RoundingMode)should be used in preference to this legacy method.9The methodBigDecimal.divide(BigDecimal, int, RoundingMode)should be used in preference to this legacy method.9The methodBigDecimal.setScale(int, RoundingMode)shouldbe used in preference to this legacy method.17UseDatagramChannel, or subclassDatagramSocketdirectly.
This method provided a way in early JDK releases to replace the system wide implementation ofDatagramSocket. It has been mostly obsolete since Java 1.4. If required, aDatagramSocketcan be created to use a custom implementation by extendingDatagramSocketand using theprotected constructor that takes animplementation as a parameter.1.2use getTimeToLive instead.1.2use setTimeToLive instead.25Permissions can no longer be used for controlling access to resourcesas the Security Manager is no longer supported.14The network interface may not be uniquely identified by the InetAddress returned. UseMulticastSocket.getNetworkInterface()instead.141.2use theMulticastSocket.getTimeToLive()method instead,which returns anint instead of abyte.14This method does not accept the network interface on which to join the multicast group. UseMulticastSocket.joinGroup(SocketAddress, NetworkInterface)instead.14This method does not accept the network interface on which to leave the multicast group. UseMulticastSocket.leaveGroup(SocketAddress, NetworkInterface)instead.1.4Use the following code or its equivalent instead:...... int ttl = mcastSocket.getOption(StandardSocketOptions.IP_MULTICAST_TTL); mcastSocket.setOption(StandardSocketOptions.IP_MULTICAST_TTL, newttl); mcastSocket.send(p); mcastSocket.setOption(StandardSocketOptions.IP_MULTICAST_TTL, ttl); ......14The InetAddress may not uniquely identify the network interface. UseMulticastSocket.setNetworkInterface(NetworkInterface)instead.14UseDatagramSocket.setOption(SocketOption, Object)withStandardSocketOptions.IP_MULTICAST_LOOPinstead. The loopback mode is enabled by default,MulticastSocket.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, false)disables it.1.2use theMulticastSocket.setTimeToLive(int)method instead, which usesint instead ofbyte as the type for ttl.17Use aServerSocketFactoryand subclassServerSocketdirectly.
This method provided a way in early JDK releases to replace the system wide implementation ofServerSocket. It has been mostly obsolete since Java 1.4. If required, aServerSocketcan be created to use a custom implementation by extendingServerSocketand using theprotected constructor that takes animplementation as a parameter.17Use aSocketFactoryand subclassSocketdirectly.
This method provided a way in early JDK releases to replace the system wide implementation ofSocket. It has been mostly obsolete since Java 1.4. If required, aSocketcan be created to use a custom implementation by extendingSocketand using theprotected constructor that takes animplementation as a parameter.The instance specific getRequestProperty methodshould be used after an appropriate instance of URLConnectionis obtained.25Permissions can no longer be used for controlling access to resourcesas the Security Manager is no longer supported.The instance specific setRequestProperty methodshould be used after an appropriate instance of URLConnectionis obtained. Invoking this method will have no effect.The resulting string may vary depending on the default charset. Instead, use the decode(String,String) method to specify the encoding.The resulting string may vary depending on the default charset. Instead, use the encode(String,String) method to specify the encoding.Use setURL(URL, String, String, int, String, String, String, String);no replacement. As of the Java 2 platform v1.2, RMI nolonger uses theRegistryHandlerto obtain the registry'simplementation.no replacement. As of the Java 2 platform v1.2, RMI nolonger uses theRegistryHandlerto obtain the registry'sstub.no replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacement1.2 style stubs no longer use this method. Instead ofusing a sequence of method calls to the remote reference(newCall,invoke, anddone), astub uses a single method,invoke(Remote, Method, Object[],int), on the remote reference to carry out parametermarshalling, remote method executing and unmarshalling of the returnvalue.1.2 style stubs no longer use this method. Instead ofusing a sequence of method calls to the remote reference(newCall,invoke, anddone), astub uses a single method,invoke(Remote, Method, Object[],int), on the remote reference to carry out parametermarshalling, remote method executing and unmarshalling of the returnvalue.1.2 style stubs no longer use this method. Instead ofusing a sequence of method calls on the stub's the remote reference(newCall,invoke, anddone), astub uses a single method,invoke(Remote, Method, Object[],int), on the remote reference to carry out parametermarshalling, remote method executing and unmarshalling of the returnvalue.No replacement. ThesetRefmethodwas intended for setting the remote reference of a remotestub. This is unnecessary, sinceRemoteStubs can be createdand initialized with a remote reference through use oftheRemoteStub(RemoteRef)constructor.no replacement. This method has no purpose in the absenceof a Security Manager.replaced byloadClass(String,String)methodno replacementno replacementThis method is deprecated because it supports only static stubs.UseexportObject(Remote, port)orexportObject(Remote, port, csf, ssf)instead.16UseX509Certificate.getIssuerX500Principal()instead. This methodreturns theissueras an implementation specificPrincipalobject, which should not be relied upon by portablecode.16UseX509Certificate.getSubjectX500Principal()instead. This methodreturns thesubjectas an implementation specificPrincipalobject, which should not be relied upon by portablecode.16UseX509CertSelector.getIssuer()orX509CertSelector.getIssuerAsBytes()instead. This method should not be relied on as it can fail to matchsome certificates because of a loss of encoding information in theRFC 2253 String form of some distinguished names.16UseX509CertSelector.getSubject()orX509CertSelector.getSubjectAsBytes()instead. This method should not be relied on as it can fail to matchsome certificates because of a loss of encoding information in theRFC 2253 String form of some distinguished names.16UseX509CertSelector.setIssuer(X500Principal)orX509CertSelector.setIssuer(byte[])instead. This method should not be relied onas it can fail to match some certificates because of a loss of encodinginformation in the RFC 2253 String form of some distinguished names.16UseX509CertSelector.setSubject(X500Principal)orX509CertSelector.setSubject(byte[])instead. This method should not be reliedon as it can fail to match some certificates because of a loss ofencoding information in the RFC 2253 String form of some distinguishednames.16UseX509CRL.getIssuerX500Principal()instead. This methodreturns theissueras an implementation specificPrincipalobject, which should not be relied upon by portablecode.16UseX509CRLSelector.addIssuer(X500Principal)orX509CRLSelector.addIssuerName(byte[])instead. This method should not berelied on as it can fail to match some CRLs because of a loss ofencoding information in the RFC 2253 String form of some distinguishednames.9useProvider.getVersionStr()instead.This method used to return the value of a proprietaryproperty in the master file of the "SUN" Cryptographic ServiceProvider in order to determine how to parse algorithm-specificparameters. Use the new provider-based and algorithm-independentAlgorithmParametersandKeyFactoryengineclasses (introduced in the J2SE version 1.2 platform) instead.UsesetParameter.Replaced byengineSetParameter.1.2usegetBigDecimal(int parameterIndex)orgetBigDecimal(String parameterName)1.21.21.21.21.21.21.2UsegetLogWriter1.2UsesetLogWriter1.2UsesetCharacterStream1.2UsegetBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel)1.2UsegetBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel)1.2usegetCharacterStreamin place ofgetUnicodeStream1.2usegetCharacterStreaminstead1.21.21.21.21.21.21.29This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicBoolean.compareAndExchange(boolean, boolean)andAtomicBoolean.compareAndSet(boolean, boolean)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicBoolean.weakCompareAndSetPlain(boolean, boolean)be used instead.9This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicInteger.compareAndExchange(int, int)andAtomicInteger.compareAndSet(int, int)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicInteger.weakCompareAndSetPlain(int, int)be used instead.9This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicIntegerArray.compareAndExchange(int, int, int)andAtomicIntegerArray.compareAndSet(int, int, int)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicIntegerArray.weakCompareAndSetPlain(int, int, int)be used instead.9This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicLong.compareAndExchange(long, long)andAtomicLong.compareAndSet(long, long)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicLong.weakCompareAndSetPlain(long, long)be used instead.9This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicLongArray.compareAndExchange(int, long, long)andAtomicLongArray.compareAndSet(int, long, long)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicLongArray.weakCompareAndSetPlain(int, long, long)be used instead.9This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicReference.compareAndExchange(V, V)andAtomicReference.compareAndSet(V, V)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicReference.weakCompareAndSetPlain(V, V)be used instead.9This method has plain memory effects but the methodname implies volatile memory effects (see methods such asAtomicReferenceArray.compareAndExchange(int, E, E)andAtomicReferenceArray.compareAndSet(int, E, E)). To avoidconfusion over plain or volatile memory effects it is recommended thatthe methodAtomicReferenceArray.weakCompareAndSetPlain(int, E, E)be used instead.17This method originally returned aCallableobject that when called, executed the givencallableunder the current access control context. Access control contexts were only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.17This method originally returned aCallableobject that when called, executed the givencallableunder the current access control context, with the current context class loader as the context class loader. Access control contexts were only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.17This method originally returned a thread factory that created new threads that had the same access control context as the current thread. Access control contexts were only useful in conjunction withthe Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.As of JDK version 1.1,replaced byCalendar.get(Calendar.DAY_OF_MONTH).As of JDK version 1.1,replaced byCalendar.get(Calendar.DAY_OF_WEEK).As of JDK version 1.1,replaced byCalendar.get(Calendar.HOUR_OF_DAY).As of JDK version 1.1,replaced byCalendar.get(Calendar.MINUTE).As of JDK version 1.1,replaced byCalendar.get(Calendar.MONTH).As of JDK version 1.1,replaced byCalendar.get(Calendar.SECOND).As of JDK version 1.1,replaced by-(Calendar.get(Calendar.ZONE_OFFSET) +Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000).As of JDK version 1.1,replaced byCalendar.get(Calendar.YEAR) - 1900.As of JDK version 1.1,replaced byDateFormat.parse(String s).As of JDK version 1.1,replaced byCalendar.set(Calendar.DAY_OF_MONTH, int date).As of JDK version 1.1,replaced byCalendar.set(Calendar.HOUR_OF_DAY, int hours).As of JDK version 1.1,replaced byCalendar.set(Calendar.MINUTE, int minutes).As of JDK version 1.1,replaced byCalendar.set(Calendar.MONTH, int month).As of JDK version 1.1,replaced byCalendar.set(Calendar.SECOND, int seconds).As of JDK version 1.1,replaced byCalendar.set(Calendar.YEAR, year + 1900).As of JDK version 1.1,replaced byDateFormat.format(Date date), using aGMTTimeZone.As of JDK version 1.1,replaced byDateFormat.format(Date date).As of JDK version 1.1,replaced byCalendar.set(year + 1900, month, date, hrs, min, sec)orGregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTCTimeZone, followed byCalendar.getTime().getTime().17This method originally checked that the current context wastrusted to modify the logging configuration. This method was only usefulin conjunction withthe Security Manager,which is no longer supported. There is no replacement for the SecurityManager or this method.9java.util.logging.LoggingMXBeanis deprecated and replaced withjava.lang.management.PlatformLoggingMXBean. UseManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class) instead.16Values returned by this method may be synthesized, and may not correspond to the actualthread id, useLogRecord.getLongThreadID()instead.LogRecord maintains timestamps with nanosecond resolution, usingInstantvalues. For this reason,setInstant()should be used in preference tosetMillis().16This method doesn't allow to pass a longthread id, useLogRecord.setLongThreadID(long)instead.This method does not throw an IOException if an I/O erroroccurs while saving the property list. The preferred way to save aproperties list is via thestore(OutputStream out,String comments)method or thestoreToXML(OutputStream os, String comment)method.23UseDeflater.getBytesRead()instead23UseDeflater.getBytesWritten()instead23UseInflater.getBytesRead()instead23UseInflater.getBytesWritten()instead9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.9Finalization has been deprecated for removal. SeeObject.finalize()for background information and detailsabout migration options.This method has no effect. The MBean Server used toobtain an attribute value isQueryEval.getMBeanServer().1.5UseMBeanServer.getClassLoaderRepository()to obtain theclass loader repository and use it to deserialize.1.5UsegetClassLoaderto obtainthe class loader for deserialization.1.5UsegetClassLoaderFortoobtain the appropriate class loader for deserialization.25This method exists for historical reasons. Ifwriting to XML is required, it should be implemented externally.As of JMX 1.2, replaced byCounterMonitor.getDerivedGauge(ObjectName)As of JMX 1.2, replaced byCounterMonitor.getDerivedGaugeTimeStamp(ObjectName)As of JMX 1.2, replaced byCounterMonitor.getThreshold(ObjectName)As of JMX 1.2, replaced byCounterMonitor.setInitThreshold(Number)As of JMX 1.2, replaced byCounterMonitorMBean.getDerivedGauge(ObjectName)As of JMX 1.2, replaced byCounterMonitorMBean.getDerivedGaugeTimeStamp(ObjectName)As of JMX 1.2, replaced byCounterMonitorMBean.getThreshold(ObjectName)As of JMX 1.2, replaced byCounterMonitorMBean.setInitThreshold(Number)As of JMX 1.2, replaced byGaugeMonitor.getDerivedGauge(ObjectName)As of JMX 1.2, replaced byGaugeMonitor.getDerivedGaugeTimeStamp(ObjectName)As of JMX 1.2, replaced byGaugeMonitorMBean.getDerivedGauge(ObjectName)As of JMX 1.2, replaced byGaugeMonitorMBean.getDerivedGaugeTimeStamp(ObjectName)As of JMX 1.2, replaced byMonitor.getObservedObjects()As of JMX 1.2, replaced byMonitor.addObservedObject(ObjectName)As of JMX 1.2, replaced byMonitorMBean.getObservedObjects()As of JMX 1.2, replaced byMonitorMBean.addObservedObject(ObjectName)As of JMX 1.2, replaced byStringMonitor.getDerivedGauge(ObjectName)As of JMX 1.2, replaced byStringMonitor.getDerivedGaugeTimeStamp(ObjectName)As of JMX 1.2, replaced byStringMonitorMBean.getDerivedGauge(ObjectName)As of JMX 1.2, replaced byStringMonitorMBean.getDerivedGaugeTimeStamp(ObjectName)21This method supported the legacy Subject Delegation feature,which has been removed. There is no replacement.This method is not needed because aValueExpcan access the MBean server in which itis being evaluated by usingQueryEval.getMBeanServer().9TheHandshakeCompletedEvent.getPeerCertificates()method that returns an array ofjava.security.cert.Certificateshould be used instead.9TheSSLSession.getPeerCertificates()method that returns an array ofjava.security.cert.Certificateshould be used instead.18This method originally performed the specifiedPrivilegedActionwith privileges enabled. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.18This method originally performed the specifiedPrivilegedExceptionActionwith privileges enabled. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.17This method originally performed the specifiedPrivilegedActionwith privileges enabled and restricted by the specifiedAccessControlContext. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to ignore theAccessControlContextand launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.17This method originally performed the specifiedPrivilegedExceptionActionwith privileges enabled and restricted by the specifiedAccessControlContext. Running the action with privileges enabled was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to ignore theAccessControlContextand launch the action as is and bind the subject to the period of its execution. A replacement API namedSubject.callAs(Subject, Callable)has been added which can be used to perform the same work. There is no replacement for the Security Manager.17This method used to get the subject associated with the providedAccessControlContext, which was only useful in conjunction withthe Security Manager, which is no longer supported. This method has been changed to always throwUnsupportedOperationException. A replacement API namedSubject.current()has been added which can be used to obtain the current subject. There is no replacement for the Security Manager.getCharacterStream should be used in its place- Replaced bygetText- Replaced bysetText(text)as of 1.4, replaced byKeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy)As of 1.4, replaced byKeyboardFocusManager.getDefaultFocusTraversalPolicy()9As of JDK version 1.1,replaced byjava.awt.Component.setEnabled(boolean).As of JDK version 1.1,replaced byjava.awt.Component.setEnabled(boolean).As of 1.4, replaced byFocusTraversalPolicy.As of 1.4, replaced byComponent.setFocusTraversalKeys(int, Set)andContainer.setFocusCycleRoot(boolean).As of 1.4, replaced byFocusTraversalPolicy.getDefaultComponent(Container).requestFocus()As of JDK 5,replaced byComponent.setBounds(int, int, int, int).Moves and resizes this component.
As of 1.4, replaced byFocusTraversalPolicyAs of Swing version 1.0.3,replaced bygetJMenuBar().24since JDK 24As of Swing version 1.0.3 replaced bysetJMenuBar(JMenuBar m).As of JDK 1.7, replaced byJList.getSelectedValuesList()replaced bygetComponent(int i)As of Java 2 platform v1.2,replaced bygetPassword.As of Java 2 platform v1.2,replaced bygetPassword.replaced byContainer.getComponent(int)As of Swing version 1.0.3 replaced bygetJMenuBar().As of Swing version 1.0.3 replaced bysetJMenuBar(JMenuBar menu).As of Swing version 1.0.2,replaced bynew JScrollPane(aTable).As of Swing version 1.0.3,replaced bydoLayout().As of Java 2 platform v1.3, replaced bygetScrollMode().As of Java 2 platform v1.3, replaced bysetScrollMode().use getKeyStroke(char)17Obsolete method, not used anymore.17Obsolete method, not used anymore.17Obsolete method, not used anymore.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3, instead set the border on thedivider.999917It is recommended thatBasicToolBarUI.createFloatingWindow(JToolBar)be used insteadAs of Java 2 platform v1.4.As of Java 2 platform v1.4.- Replaced byBasicScrollPaneUI.uninstallListeners(JComponent)9999999999The Applet API is deprecated. See the java.applet packagedocumentation for further information.As of JDK version Swing1.1 replaced byJScrollPane.getViewportBorderBounds().As of 1.4, replaced byKeyboardFocusManager.getFocusOwner().as of Java 2 platform v1.3as of Java 2 platform v1.3As of Java 2 platform v1.3, use insertAtBoundary9replaced byJTextComponent.modelToView2D(int)9replaced byJTextComponent.viewToModel2D(Point2D)FontMetrics are not used for glyph rendering when running in the JDK.999999Table cells can now be any arbitraryView implementation and should be produced by theViewFactory rather than the table.9999999999As of JDK version 1.713useStandardJavaFileManager.getJavaFileObjectsFromPaths(Collection)instead,to prevent the possibility of accidentally calling the method with asinglePathas such an argument. AlthoughPathimplementsIterable<Path>, it would almost never be correct to pass a singlePathand have it be treated as anIterableof itscomponents.9This method is subject to removal in a future version ofJava SE.Use thesystem tool provider orservice loader mechanisms tolocate system tools as well as user-installed tools.1.7This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacementXMLEventFactory.newFactory(java.lang.String, java.lang.ClassLoader)method defines no changes in behavior.1.7This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacementXMLInputFactory.newFactory(java.lang.String, java.lang.ClassLoader)method defines no changes in behavior.1.7This method has been deprecated because it returns an instance of XMLInputFactory, which is of the wrong class. Use the new methodXMLOutputFactory.newFactory(java.lang.String, java.lang.ClassLoader)instead.11The stream-based methods have been removed from RFC 8353.UseGSSContext.acceptSecContext(byte[], int, int)instead.11The stream-based methods have been removed from RFC 8353.UseGSSContext.getMIC(byte[], int, int, MessageProp)instead.11The stream-based methods have been removed from RFC 8353.UseGSSContext.initSecContext(byte[], int, int)instead.11The stream-based methods have been removed from RFC 8353.UseGSSContext.unwrap(byte[], int, int, MessageProp)instead.11The stream-based methods have been removed from RFC 8353.UseGSSContext.verifyMIC(byte[], int, int, byte[], int, int, MessageProp)instead.11The stream-based methods have been removed from RFC 8353.UseGSSContext.wrap(byte[], int, int, MessageProp)instead.
- Deprecated ConstructorsConstructorDeprecated inDescription9It is recommended that
AWTEvent(Object, int)be used insteadas of JDK1.1; useKeyEvent(Component, int, long, int, int, char)insteadAs of JDK version 1.1, the preferred way to tokenize aninput stream is to convert it into a character stream, for example:Reader r = new BufferedReader(new InputStreamReader(is)); StreamTokenizer st = new StreamTokenizer(r);9It is rarely appropriate to use this constructor. The static factoryBoolean.valueOf(boolean)is generally a better choice, as it islikely to yield significantly better space and time performance.Also consider using the final fieldsBoolean.TRUEandBoolean.FALSEif possible.9It is rarely appropriate to use this constructor.UseBoolean.parseBoolean(String)to convert a string to abooleanprimitive, or useBoolean.valueOf(String)to convert a string to aBooleanobject.9It is rarely appropriate to use this constructor. The static factoryByte.valueOf(byte)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor.UseByte.parseByte(String)to convert a string to abyteprimitive, or useByte.valueOf(String)to convert a string to aByteobject.9It is rarely appropriate to use this constructor. The static factoryCharacter.valueOf(char)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor. The static factoryDouble.valueOf(double)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor.UseDouble.parseDouble(String)to convert a string to adoubleprimitive, or useDouble.valueOf(String)to convert a string to aDoubleobject.9It is rarely appropriate to use this constructor. Instead, use thestatic factory methodFloat.valueOf(float)method as follows:Float.valueOf((float)value).9It is rarely appropriate to use this constructor. The static factoryFloat.valueOf(float)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor.UseFloat.parseFloat(String)to convert a string to afloatprimitive, or useFloat.valueOf(String)to convert a string to aFloatobject.9It is rarely appropriate to use this constructor. The static factoryInteger.valueOf(int)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor.UseInteger.parseInt(String)to convert a string to aintprimitive, or useInteger.valueOf(String)to convert a string to anIntegerobject.9It is rarely appropriate to use this constructor. The static factoryLong.valueOf(long)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor.UseLong.parseLong(String)to convert a string to alongprimitive, or useLong.valueOf(String)to convert a string to aLongobject.179It is rarely appropriate to use this constructor. The static factoryShort.valueOf(short)is generally a better choice, as it islikely to yield significantly better space and time performance.9It is rarely appropriate to use this constructor.UseShort.parseShort(String)to convert a string to ashortprimitive, or useShort.valueOf(String)to convert a string to aShortobject.1.1This method does not properly convert bytes intocharacters. As of JDK 1.1, the preferred way to do this is via theStringconstructors that take aCharset, charset name,or that use thedefault charset.1.1This method does not properly convert bytes into characters.As of JDK 1.1, the preferred way to do this is via theStringconstructors that take aCharset, charset name,or that use thedefault charset.1.1Thestreamparameter provided a way in early JDK releases to create aSocketthat used a datagram socket. This feature no longer exists. Instead useDatagramSocketfor datagram sockets.1.1Thestreamparameter provided a way in early JDK releases to create aSocketthat used a datagram socket. This feature no longer exists. Instead useDatagramSocketfor datagram sockets.20UseURI.toURL()to construct an instance of URL. See the note onconstructor deprecation for moredetails.20UseURI.toURL()to construct an instance of URL. See the note onconstructor deprecation for moredetails.20UseURL.of(URI, URLStreamHandler)to construct an instance of URLassociated with a custom protocol handler.See the note onconstructor deprecationfor more details.20UseURI.toURL()to construct an instance of URL. See the note onconstructor deprecation for moredetails.20UseURI.toURL()to construct an instance of URL. See the note onconstructor deprecation for moredetails.20UseURL.of(URI, URLStreamHandler)to construct an instance of URLassociated with a custom protocol handler.See the note onconstructor deprecationfor more details.no replacementno replacementno replacementno replacementno replacement9useAuthProvider(String, String, String)instead.9useProvider(String, String, String)instead.19This constructor uses the default values defined in the PKCS #1 standard except for the salt length. Some of these defaults are no longer recommended due to advances in cryptanalysis -- see thePKCS#1 v2.2 standard for more details. Thus, it is recommended to explicitly specify all desired parameter values with thePSSParameterSpec(String, String, AlgorithmParameterSpec, int, int)constructor.1.2instead use the constructorDate(long date)1.2Use the constructor that takes a milliseconds value in place of this constructor1.2instead use the constructorTimestamp(long millis)As of JDK version 1.1,replaced byCalendar.set(year + 1900, month, date)orGregorianCalendar(year + 1900, month, date).As of JDK version 1.1,replaced byCalendar.set(year + 1900, month, date, hrs, min)orGregorianCalendar(year + 1900, month, date, hrs, min).As of JDK version 1.1,replaced byCalendar.set(year + 1900, month, date, hrs, min, sec)orGregorianCalendar(year + 1900, month, date, hrs, min, sec).As of JDK version 1.1,replaced byDateFormat.parse(String s).19Locale constructors have been deprecated. SeeObtaining a Locale for other options.19Locale constructors have been deprecated. SeeObtaining a Locale for other options.19Locale constructors have been deprecated. SeeObtaining a Locale for other options.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.9Release 6 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.12Release 7 is obsolete; update to a visitor for a newerrelease level.An instance created with this constructor cannot beused in a query.25This constructor exists for historical reasons. Ifreading from XML is required, it should be implemented externally.16