Java SE version migration
Under the Java Code Review set of rules, Java SE Migration category contains rules for migrating from J2SE 1.4, J2SE 5.0, Java SE 6, Java SE 7, Java SE 8 or Java SE 11. Java migration targets are Java SE 8, 11 and 17.
The
Sun to IBM Java compatibility impacts
category provides a set of
rules to migrate Sun APIs that are not available on the IBM Java Runtime Environment. Where
possible, the rules migrate the code to use
javax.net
or
com.ibm.net.ssl
classes.
The specific rules selected depends on your selection of the source Java Runtime Environment that your application previously used and the version of WebSphere you are migrating to. For Liberty, you can choose Java SE 8, 11 or 17 as your target. For WebSphere traditional, you must migrate to Java SE 8.
Quick fixes are available where possible. Rules without quick fixes flag the rule violations so you can evaluate their usage and migrate the code manually if needed.
J2SE 5.0 compatibility impacts
Rule Name | Quick Fix | Action Taken |
---|---|---|
Check for JAXP API usage compatibility | No |
The JAXP APIs used in JRE 1.4.2 might have compatibility issues when used in JRE 5. This rule detects the import of any JAXP-related packages so that you can check the usage. |
Check for JAXP EntityResolver.resolveEntity() exception compatibility | No |
JAXP EntityResolver.resolveEntity(String, String) now throws the exception, IOException, in addition to SAXException. This rule detects the missing IOException. |
Check for new JAXP DOM APIs | No |
New JAXP DOM APIs where added to the following interfaces:
This rule detects classes that implement any of these interfaces and flags them so that the new interfaces can be added. |
Check Java Object Serialization compatibility | No |
Serialization in not consistent between Java 1.4 and Java 5.0. This rule detects the classes that implement java.io.Serializable without a serialVersionUID field. |
Do not make direct references to IBMJSSEFIPS provider classes | No |
The IBMJSSEFIPS provider has been included in the IBMJSSE2 support. References to the classes of the previous provider, com.ibm.fips.*, must be removed. This rule detects the use of any reference to com.ibm.fips packages. |
Do not use APIs from com.ibm.net.ssl packages | Yes |
The classes and interfaces in the com.ibm.net.ssl package have been replaced by classes and interfaces in the javax.net.ssl package. This rule detects the use of any reference to com.ibm.net.ssl packages. The quick fix changes package names com.ibm.net.ssl to javax.net.ssl. |
Do not use APIs from sun.* packages | No |
Some APIs in the sun.* packages changed in JRE 5 and have compatibility issues with JRE 1.4.2. These APIs are not intended for use by developers. This rule detects the use of any reference to sun.* packages. |
Do not use JAXP 1.1 internal classes | No |
Internal JAXP classes changed. Do not use these internal classes in these packages:
This rule detects the use of these packages and flags them. |
Do not use JAXP 1.1 package names in string literals | No |
Some of the implementation package names changed between JAXP 1.1 and JAXP 1.3. This rule detects JAXP 1.1 package names used in string literals. |
Do not use removed IBMJSSE APIs | No |
In the conversion from IBMJSSE to IBMJSSE2 two of the JSSE classes were removed. This rule detects the use of any reference to com.ibm.jsse. KeyManagerFactoryParametersSpec and com.ibm.jsse.SSLContext. Since com.ibm.net.ssl. KeyManagerFactoryParametersSpec was migrated to com.ibm.jsse. KeyManagerFactoryParametersSpec and then removed from use, com.ibm.net.ssl. KeyManagerFactoryParametersSpec is also detected with this rule. |
Do not use the Java reserved word enum | No |
Beginning in Java 5.0, enum is a reserved Java type and cannot be used as a variable name any longer. If your code uses variables named enum, they must be renamed. This rule detects variables and arguments named enum. |
Use the BigDecimal toPlainString() method explicitly when deriving a string value | No |
The BigDecimal toString() method behaves differently than in earlier versions. J2SE 5.0 added toPlainString() to BigDecimal, which behaves like the toString() method in earlier versions. This rule detects the implicit use of the toString() method in a class. |
Use the BigDecimal toPlainString() method instead of the toString() method | Yes |
The BigDecimal toString() method behaves differently than in earlier versions. J2SE 5.0 added toPlainString() to BigDecimal, which behaves like the toString() method in earlier versions. The quick fix changes toString to toPlainString. |
Use the IBMJSSE2 Provider | Yes |
In the conversion from IBMJSSE to IBMJSSE2, the providers, IBMJSSEProvider and JSSEProvider, are replaced by IBMJSSEProvider2. This rule detects the use of any reference to com.ibm.jsse.IBMJSSEProvider and com.ibm.jsse.JSSEProvider classes. The quick fix changes the reference to com.ibm.jsse2.IBMJSSEProvider2. |
Java SE 6 compatibility impacts
Rule Name | Quick Fix | Action Taken |
---|---|---|
Check exception logic for calls to EventHandler | No |
In Java SE 6, the EventHandler constructor and create() methods require non-null parameters to be passed. This rule flags the constructor and create() method calls so that you can verify your logic handles a NullPointerException properly. |
Check for Duration and XMLGregorianCalendar equals() compatibility | No |
Detect the use of Duration and XMLGregorianCalendar equals() method. Java 6 now returns false if the parameter passed is null. The exception, NullPointerException, was thrown previously. |
Check for new methods on Java SQL interfaces | No |
The java.sql.Wrapper interface was added as a superinterface to several Java SQL interfaces. When you move to Java 6, missing methods must be added to classes that implement the interfaces that added java.sql.Wrapper. |
Check for the OverlappingFileLockException for the FileChannel lock() method | No |
In Java SE 6, the FileChannel.lock() method now throws OverlappingFileLockException. This rule flags the lock() method calls without a catch block for OverlappingFileLockException or without a throws declaration for OverlappingFileLockException on the method. |
Remove use of double slashes in JMX ObjectName elements | No |
Detect the use of the double-slash character string ("//") in JMX ObjectNames. |
Java SE 7 compatibility impacts
Rule Name | Quick Fix | Action Taken |
---|---|---|
Check for a behavior change for an empty TreeSet add and TreeMap put methods | No | This rule flags the use of java.util.TreeSet or java.util.TreeMap. Depending on the configuration of the rule, either the constructor or the add()/put() methods of these classes will get flagged. A new behavior is added in Java 7 for these methods. |
Check for a behavior change for AWT Exception Handler | No |
This rule flags the string literal
sun.awt.exception.handler . A new
exception handling mechanism is added in Java 7.
|
Check for a behavior change for File setReadOnly, setWritable and canWrite methods | No |
This rule flags the methods
java.io.File setReadOnly() ,
setWritable(boolean arg)
and
setWritable(boolean arg, boolean
user) . A new behavior is added in Java 7 for these methods.
|
Check for a behavior change for URLConnection, HttpURLConnection getInputStream method | No |
This rule flags the
getInputStream()
method on
URLConnection
or
HttpURLConnection . This method has a new behavior
in Java 7.
|
Check for a behavior change on DatagramChannel send, receive, and connect methods | No |
This rule flags calls to the
java.nio.channels.DatagramChannel send ,
receive , and
connect
methods that have a new behavior in Java 7.
|
Check for a behavior change on the isLowerCase and isUpperCase methods | No |
This rule flags the
isLowerCase
and
isUpperCase
methods.
There is a very slight chance that a behavior change in these methods could affect your application.
|
Check for a behavior change on Locale getDefault method | No | This rule flags calls to the java.util.Locale getDefault() method as it has a new behavior. |
Check for a behavior change on MouseEvent getButton method | No |
This rule flags instances of the
java.awt.event.MouseEvent getButton()
method as it has a new behavior.
|
Check for a behavior change on ThreadGroup setMaxPriority method | No |
This rule flags the method
setMaxPriority
on a
ThreadGroup
object. The method behavior has changed in JDK 7.
|
Check for a behavior change on Toolkit getPrintJob method | No |
This rule flags instances of the
java.awt.Toolkit getPrintJob(...)
method as
it has a new behavior.
|
Check for a behavior change on Window setBackground method | No |
This rule flags calls to the
java.awt.Window setBackground()
method because
its behavior changed by throwing a new exception.
|
Check for classes implementing the TypeVisitor interface | No |
This rule flags classes implementing the
javax.lang.model.type.TypeVisitor
interface. In Java SE 7, a new method was added to this interface.
|
Check for new methods on JDBC interfaces | No |
This rule detects classes that implement the JDBC interfaces that added new methods. The
interfaces include
java.sql.Connection ,
java.sql.Driver ,
java.sql.Statement , and
javax.sql.CommonDataSource .
|
Do not define methods declared as final in java.lang.Throwable | No |
This rule detects class that extend java.lang.Throwable that implement methods addSuppressed and getSuppressed which were added as new final methods in Java 7. |
Do not override the Path2D getPathIterator methods | No |
This rule flags the
Path2D getPathIterator
methods. These methods are now
marked
final
in Java 7.
|
Do not use removed class XSLTProcessorApplet | No |
This rule detects the use of the class
org.apache.xalan.client.XSLTProcessorApplet . This class has been removed from JDK 7
release.
|
Do not use the LinkedHashMap.Entry class | Yes | This rules flags uses of the java.util.LinkedHashMap.Entry class as it is no longer accessible in Java SE 7. |
Java SE 8 compatibility impacts
Java 8 is supported on Liberty and WebSphere Application Server traditional V8.5.5.9 and later.
Rule Name | Quick Fix | Action Taken |
---|---|---|
Behavior change in exceptions thrown when setting AWT focus traversal keys | No |
In Java 8, the
java.awt.Component setFocusTraversalKeys
and the
java.awt.KeyboardFocusManager setDefaultFocusTraversalKeys
methods throw
ClassCastException
instead of
IllegalArgumentException
if any
passed keystroke object is not an
AWTKeyStroke .
|
Behavior change in java.lang.String and java.util.regex.Pattern split methods | No |
In Java 8, the behavior of the
split
methods could lead to the removal of
the empty
String
that is present at the beginning of the returning array.
|
Behavior change in month name formatting for some languages | No |
In Java 8, when formatting date-time values using the
DateFormat
and
SimpleDateFormat
classes, context-sensitive month names are supported for languages
that have different date formatting and standalone forms of month names. You might see a difference
in the month name returned in strings formatted by the
DateFormat
or
SimpleDateFormat
classes or by methods on the
DateFormatSymbols
class.
|
Behavior change in most Collection.removeAll and Collection.retainAll implementations | No |
Prior to Java 8, most implementations of
Collection.removeAll(Collection)
and
retainAll(Collection)
return false and ignore a null parameter if the
collection itself is empty. In Java 8, collections throw a
NullPointerException
if
null is provided as the parameter.
|
Behavior change in new instance creation for non-public interfaces | No |
In Java 8, a code change is required to create a proxy instance for non-public interfaces
located in a different package using the
Proxy.getProxyClass
and
Constructor.newInstance
methods.
|
Behavior change in rounding in NumberFormat and DecimalFormat format methods | No |
In Java 8, the rounding behavior of the
NumberFormat
and
DecimalFormat
format methods changed to match the rounding of the binary
representation of the number.
|
Behavior change in the BigDecimal stripTrailingZeros method for a zero value | No |
Java 8 introduces a behavior change when
java.math.BigDecimal
stripTrailingZeros
operates on a zero value with a nonzero scale.
|
Behavior change in the construction of dynamic proxy classes | No |
In Java 8, calling
java.lang.reflect.Proxy(InvocationHandler)
with a
null
parameter throws a
NullPointerException . Prior to Java 8, the
constructor returns a proxy, but any method calls on that proxy throw a
NullPointerException .
|
Check for classes that implement the TypeVisitor interface | No |
Java 8 added a new method to the
javax.lang.model.type.TypeVisitor
interface. This rule flags classes that implement this interface.
|
DatagramPacket constructor with SocketAddress no longer declares SocketException | No |
In Java 8,
java.net.DatagramPacket
constructors were changed to remove the
SocketException
declaration. This rule flags
java.net.DatagramPacket
constructors that accept a
java.net.SocketAddress
argument when the constructors are within a try block that
catches either a
java.net.SocketException
or its superclass
java.io.IOException .
|
Differences in class loading for JAXP service providers | No | Java 8 includes Java API for XML Processing (JAXP) 1.6, which handles class loading for service providers differently than previous versions. |
java.lang.Thread stop(java.lang.Throwable) is disabled | No |
In Java 8, the
java.lang.Thread.stop(java.lang.Throwable)
method is
disabled.
|
MBean and MXBean interfaces must be public | Yes | Java 8 enforces the requirement that MBean and MXBean management interfaces be public. Non-public interfaces are not allowed to expose the management functionality. This specification requirement was not enforced in Java 7 and prior versions. |
New methods in java.util.concurrent.ConcurrentHashMap | No |
In Java 8, the
ConcurrentHashMap
class introduced over 30 new methods. If
you extend the
java.util.concurrent.ConcurrentHashMap
class, your class might need
changes.
|
The mechanism to select a locale service provider changed | No | In Java 8, the mechanism to select a locale service provider changed. A new method in the LocaleServiceProvider class allows implementations to determine whether the given locale is supported. |
Java SE 11 compatibility impacts
Java 11 is supported on Liberty v19.0.0.1 and later.
Rule Name | Quick Fix | Action Taken |
---|---|---|
Avoid using the deprecated RMIIIOPServerImpl class | No |
This rule flags the use of the
RMIIIOPServerImpl
class. This class was
deprecated in Java SE 11.
|
Behavior change in default locale data | No | The Unicode Consortium's Common Locale Data Repository (CLDR) is enabled as the default locale data in Java 11. In previous releases, the default was JRE, which is now known as COMPAT. Code that uses locale-sensitive services such as date, time, and number formatting may produce different results with the CLDR locale data. |
Behavior change in exceptions when calling the Class.getAnnotation() method | No |
In Java 11, the
java.lang.Class.getAnnotation()
method throws a
java.lang.TypeNotPresentException
instead of
java.lang.ArrayStoreException
if the annotation has an array value that references
a missing class.
|
Behavior change in java.util.concurrent.ThreadPoolExecutor. finalize() method | No |
In Java 11, the
java.util.concurrent.ThreadPoolExecutor.finalize()
method no
longer shuts down the thread pool.
|
Behavior change in the java.lang.invoke.MethodHandles. filterArguments method | No |
This rule flags applications that use the
java.lang.invoke.MethodHandles.filterArguments
method.
|
Behavior change in the javax.management.MBeanOperationInfo constructor | No |
This rule flags applications that use the
javax.management.MBeanOperationInfo
constructor if the impact provided is not one
of INFO, ACTION, ACTION_INFO, or UNKNOWN
|
Behavior change on java.xml API methods with raw types | No |
In Java 11, the
java.xml
APIs containing method declarations with raw types
were updated to add a type parameter.
|
Check for a behavior change on the Selector select and selectNow methods | No |
This rule flags the
java.nio.channels.Selector.select()
and
java.nio.channels.Selector.selectNow()
methods. The methods behavior has changed in
JDK 11.
|
Check for behavior changes related to the separation of blocking and non-blocking code paths for I/O channels | No | In Java 11, separate blocking and non-blocking code paths were created for I/O channels to increase performance and reliability. This rule flags API calls that might be impacted by the behavior change. |
Check for configuration changes related to the com.ibm.security.auth.module. Krb5LoginModule class | No |
This rule flags any reference to
com.ibm.security.auth.module.Krb5LoginModule
related classes that might require
configuration changes when migrating to Java 11.
|
Check for removed methods on Pack200.Packer and Pack200.Unpacker interfaces | No |
The
addPropertyChangeListener
and
removePropertyChangeListener
are no longer defined on the
Pack200.Packer
and
Pack200.Unpacker
interfaces in Java 11.
|
Do not use APIs from the com.sun.image.codec.jpeg package | No |
The
com.sun.image.codec.jpeg
API is not available in Java SE 11.
|
Do not use APIs from the com.sun.xml.internal.bind.* packages | No |
The APIs in
com.sun.xml.internal.bind.*
packages are no longer available in
Java SE 11.
|
Do not use APIs from the sun.* packages | No |
The
sun.*
APIs are unsupported, JDK-internal APIs, and may go away at any
time.
|
Do not use javax.security.auth.Policy class | No |
The
javax.security.auth.Policy
Class is not available in Java SE 11. This
rule flags any reference to the
javax.security.auth.Policy
Class.
|
Do not use removed com.sun classes | No |
This rule flags
com.sun
classes that are not available in Java SE
11.
|
Do not use removed runFinalizersOnExit methods | No |
The
java.lang.Runtime.runFinalizersOnExit
and
java.lang.System.runFinalizersOnExit
methods were removed from Java SE 11.
|
Do not use the com.ibm.security.auth.module. Krb5LoginModule class | No |
The
com.ibm.security.auth.module.Krb5LoginModule
class is not available in
Java SE 11.
|
Do not use the com.sun.xml.internal.bind.v2. ContextFactory class | Yes |
The
com.sun.xml.internal.bind.v2.ContextFactory
is no longer available in
Java SE 11.
|
Do not use the getPeer method | No |
All methods in the Java SE API that return a class from the
java.awt.peer
package have been removed from Java 11. To see if a peer has been set yet, use the
Component.isDisplayable()
method. To test if a component is lightweight, use the
Component.isLightWeight()
method.
|
Do not use the java.lang.ref.Reference clone method | No |
The
java.lang.ref.Reference
clone method is no longer supported in Java
11.
|
Do not use the netdoc URL protocol | No | The netdoc protocol handler has been removed in Java 11. |
Do not use the removed com.sun.java.browser.plugin2.DOM and sun.plugin.dom.DOMObject APIs | No |
The
com.sun.java.browser.plugin2.DOM
and
sun.plugin.dom.DOMObject
APIs are not available in Java SE 11.
|
Do not use the removed com.sun.java.swing.plaf.nimbus. NimbusLookAndFeel or apple.laf.AquaLookAndFeel Swing LookAndFeel | No |
The
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
and
apple.laf.AquaLookAndFeel
Swing LookAndFeels are no longer supported by the
javax.swing.UIManager.setLookAndFeel
method in Java SE 11.
|
Do not use the removed java.lang.Thread.destroy() or java.lang.Thread.stop(java.lang.Throwable) methods | No |
The
java.lang.Thread.destroy()
and
java.lang.Thread.stop(java.lang.Throwable)
methods have been removed in Java SE 11.
|
Do not use the removed javax.crypto.ExemptionMechanism. finalize() method | No |
The
javax.crypto.ExemptionMechanism.finalize()
method was removed from Java
SE 11.
|
Do not use the removed jdk.Exported annotation | No |
The
jdk.Exported
annotation is not available in Java SE 11.
|
Do not use the removed methods addPropertyChangeListener or removePropertyChangeListener from LogManager | No |
The
addPropertyChangeListener
and
removePropertyChangeListener
methods are not available on the
java.util.logging.LogManager
class in Java 11.
|
Do not use the removed Runtime.getLocalizedInputStream and Runtime.getLocalizedOutputStream methods | No |
The
Runtime.getLocalizedInputStream
and
Runtime.getLocalizedOutputStream
methods were removed from Java SE 11.
|
Do not use the SecurityManager removed methods | No |
This rule flags methods that were removed from the
java.lang.SecurityManager
class in Java SE 11.
|
Java 11 version number format change | No | Java 11 marks the beginning of a new version number naming convention. The version numbers format changed from 1.8 (Java 8) to 11 (Java 11). |
Review resource cleanup on FileInputStream and FileOutputStream overridden close method | No |
This rule flags the
close()
method on subclasses of
java.io.FileInputStream
and
java.io.FileOutputStream .
|
Run the Java class dependency analyzer tool (JDeps) | No | The JDK ships a command line utility called jdeps that analyzes class dependencies. The tool can be used to identify jdk internal packages that are no longer available in JDK 11. |
The java.awt.peer and java.awt.dnd.peer packages are not accessible | No |
All methods in the Java SE API that refer to types defined in the
java.awt.peer
and
java.awt.dnd.peer
packages have been removed
from Java 11. Code that calls a method that previously accepted or returned a type defined in these
packages no longer compiles or runs in Java 11.
|
The java.nio.channels.DatagramChannel.send() method throws AlreadyConnectedException instead of IllegalArgumentException | No |
When the address passed to the java.nio.channels.DatagramChannel.
send(ByteBuffer,SocketAddress) method is different than the connected address, this method throws an
AlreadyConnectedException
instead of an
IllegalArgumentException
in Java SE 11.
|
The java.nio.channels.Selector and java.nio.channels.SelectableChannel classes can be used in concurrent threads safely | No |
The
java.nio.channels.Selector
and
java.nio.channels.SelectableChannel
classes have been updated to be used in
concurrent threads safely in Java SE 11.
|
The java.transaction module was removed from JDK 11 | No |
This rule flags applications that use packages in the
javax.transaction
module.
|
The java.xml.bind and java.activation modules were removed from JDK 11 (Custom Implementation) | No |
This rule flags applications that use packages in the
java.xml.bind
or
java.activation
modules and package their own JAXB implementation.
|
The java.xml.bind and java.activation modules were removed from JDK 11 (Default Implementation) | No |
This rule flags applications that use packages in the
java.xml.bind
or
java.activation
modules and use the WebSphere default JAXB implementation.
|
The JavaFX modules were removed from JDK 11 | No | The JavaFX modules are not available in Java SE 11. |
URLClassLoader constructors and newInstance() calls throw a NullPointerException when the array contains a null element | No |
URLClassLoader
constructors and
newInstance()
calls throw a
NullPointerException
when the URL array contains a null element in Java SE
11.
|
The Java Web Start technology was removed from JDK 11 | No | The Java Web Start technology is not available in JDK 11. This rule flags jnlp files in an application. |
Behavior change for the ForkJoinPool common pool class loader | No | This rule flags methods that may behave differently based on the thread context class loader propagation for an application. |
Rule Name | Quick Fix | Action Taken |
---|---|---|
The java.corba module was removed from JDK 11 | No |
This rule flags applications that use packages in the
java.corba
module.
|
The java.xml.ws module was removed from JDK 11 (Custom Implementation) | No |
This rule flags applications that use packages in the
java.xml.ws
module and
package their own JAX-WS implementation.
|
The java.xml.ws module was removed from JDK 11 (Default Implementation) | No |
This rule flags applications that use packages in the
java.xml.ws
module and
use the WebSphere default JAX-WS implementation.
|
The IBM XML implementation is removed in Java 11. See Determining application compatibility: XML for more information.
Rule Name | Quick Fix | Action Taken |
---|---|---|
Detected dependencies on internal packages of the IBM XML implementation | No | This rule flags references to IBM XML internal packages. |
Detected string literal references to IBM XML implementation specific configuration parameters | No | This rule flags string literal references to IBM XML implementation specific configuration parameters. |
Detected string literal references to internals of the IBM XML implementation | No | This rule flags string literal references to the IBM XML implementation. |
Java SE 17 compatibility impacts
Java 17 is supported on Liberty 21.0.0.10 and later. The Java SE 17 compatibility impacts include all the compatibility impacts from Java SE versions 12 to 17.
Rule Name | Quick Fix | Action Taken |
---|---|---|
Behavior change in Properties.loadFromXML method for non-compliant XML documents | No |
This rule flags
java.util.Properties.loadFromXML(java.io.InputStream)
method calls. The method throws an exception for non-compliant XML documents in Java SE 12.
|
Behavior change for the user.timezone system property | No |
This rule flags
System.getProperty
method calls with the
user.timezone
property value. The method may return null in Java SE 12.
|
Do not use the removed FileInputStream.finalize() and FileOutputStream.finalize() methods | No |
The
java.io.FileInputStream.finalize()
and
java.io.FileOutputStream.finalize()
methods were removed from Java SE 12.
|
Do not use the com.sun.awt.SecurityWarning class | No |
The
com.sun.awt.SecurityWarning
class was removed from Java SE 12.
|
Do not use the removed ZipFile.finalize(), Inflater.finalize() and Deflater.finalize() methods | No |
The
java.util.zip.ZipFile.finalize() ,
java.util.zip.Inflater.finalize()
and
java.util.zip.Deflater.finalize()
methods were removed from Java SE 12.
|
Do not use the removed Runtime.traceInstructions(boolean) and Runtime.traceMethodCalls(boolean) methods | No |
The
java.lang.Runtime.traceInstructions(boolean)
and
java.lang.Runtime.traceMethodCalls(boolean)
methods were removed from Java SE 13.
|
The java.util.jar.Pack200 APIs were removed | No |
The
java.util.jar.Pack200
class was removed in addition to its
java.util.jar.Pack200.Packer
and
java.util.jar.Pack200.Unpacker
interfaces.
|
The sun.nio.cs.map system property was removed | No |
The
sun.nio.cs.map
system property was removed in Java SE 14. This rule
flags string literal references to "sun.nio.cs.map"
|
The java.security.acl package was removed | No |
The
java.security.acl
package was removed in Java SE 14, the
java.security.Policy
classes should be used instead.
|
Weak named curves have been removed | No | Weak named curves have been removed from the SunEC provider in Java SE 16. This rule flags references to any of the weak named curves. |
Check for a namespace clash with the new java.lang.Record class | No |
The
java.lang.Record
class has been added in Java SE 14. To avoid a
namespace clash, ensure that any other class named "Record" is imported using a single-type import
(for example: "com.foo.Record") instead of a wild-card import (for example: "com.foo.*").
|
The netscape.javascript.JSObject.getWindow(Applet) method has been removed | No |
The
netscape.javascript.JSObject.getWindow(Applet)
method was removed in
Java SE 14. Since the method was only used with Java Plugins, which have also been removed, there is
no replacement for this method.
|
Check for a behavior change on the DatagramPacket.getPort() method | No |
The default return value for the
DatagramPacket.getPort()
method was changed
from -1 to 0 in Java SE 15.
|
The RMIConnectorServer.CREDENTIAL_TYPES constant was removed | No |
The
RMIConnectorServer.CREDENTIAL_TYPES
constant was removed in Java SE 15.
|
The SSLSession.getPeerCertificateChain() method implementation has been removed | No |
The default
SSLSession.getPeerCertificateChain()
method implementation has
been removed in Java SE 15.
|
The Modifier() and ConstantBootstraps() constructors have been removed | No |
The
Modifier()
and
ConstantBootstraps()
constructors have
been removed in Java SE 15.
|
The SO_FLOW_SLA Solaris socket option has been removed | No |
The
SO_FLOW_SLA
Solaris socket option and related
SocketFlow
and
SocketFlow.Status
classes have been removed in Java
SE 15.
|
The com.sun.net.ssl.internal.ssl.Provider provider name was removed | Yes |
The
com.sun.net.ssl.internal.ssl.Provider
legacy SunJSSE provider name has
been removed in Java SE 15. It should be replaced with the
SunJSSE
provider name.
|
Check for the isEmpty() default method on the java.lang.CharSequence interface | No |
A default
isEmpty()
method has been added to the
java.lang.CharSequence
interface in Java SE 15. Classes that implement
java.lang.CharSequence
and another interface that defines a default
isEmpty()
method might need to be updated.
|
Java SE 17 general information and potential issues | No | General information on the changes in Java SE 17 and potential migration issues that are not detected by this tool. |
The ToolProvider() constructor has been removed | No |
The
ToolProvider
constructor has been removed in Java SE 16.
|
Avoid using the deprecated methods in java.lang.Thread and java.lang.ThreadGroup | No |
The
suspend and
resume methods within
java.lang.Thread and the
suspend ,
resume , and
allowThreadSuspension methods within
java.lang.ThreadGroup
were deprecated in Java SE 14.
The
stop ,
destroy ,
isDestroyed ,
setDaemon
and
isDaemon
methods within
java.lang.ThreadGroup
were deprecated in Java SE 16.
|
Check for the toList() default method on the java.util.stream.Stream interface | No |
A default
toList()
method has been added to the
java.util.stream.Stream
interface in Java SE 16. Classes that implement
java.util.stream.Stream
and another interface that defines a default
toList()
method might need to be updated.
|
Check for a behavior change on the HttpPrincipal.getName() method | No |
The value returned by the
HttpPrincipal.getName()
method was changed in Java
SE 16.
|
Check for a behavior change in the java.io.LineNumberReader class | No |
The definition of line terminator in the
java.io.LineNumberReader
class was
changed in Java SE 16.
|
Avoid using the deprecated java.security.cert APIs | No |
The
getIssuerDN ,
getSubjectDN ,
getIssuerDN ,
setIssuer ,
setSubject ,
getIssuerAsString ,
getSubjectAsString , and
addIssuerName
methods within
java.security.cert.X509Certificate ,
java.security.cert.X509CRL ,
java.security.cert.X509CertSelector , and
java.security.cert.X509CRLSelector
were deprecated in Java SE 16.
|
Check for a behavior change in the on HttpClient.newHttpClient and HttpClient.Builder.build | No |
Instantiating
java.net.http.HttpClient
may throw an
UncheckedIOException
if there are not enough underlying resources.
|
Avoid using the deprecated methods in java.util.logging.LogRecord | No |
The
getThreadID
and
setThreadID
methods within
java.util.logging.LogRecord
were deprecated in Java SE 16.
|
Avoid using deprecated primitive wrapper class constructors | No | Primitive wrapper class constructors were deprecated in Java SE 16. |
Avoid using synchronization on any value-based classes | No | Synchronization on instances of all value-based classes in Java SE 16 is discouraged. |
The javax.security.cert package has been deprecated for removal | Yes |
The |
The Thread.countStackFrames() method was changed to unconditionally throw an UnsupportedOperationException | No |
The terminally deprecated method |
Avoid using the removed RMI Activation package | No |
The |
The Socket Implementation Factory Mechanism has been deprecated | No | The following methods used to set the system-wide socket implementation factories have been deprecated in Java SE 17:
static void ServerSocket.setSocketFactory(SocketImplFactory fac) ,
static void Socket.setSocketImplFactory(SocketImplFactory fac) ,
static void DatagramSocket.setDatagramSocketImplFactory(DatagramSocketImplFactory fac) .
|
Check for a behavior change in regular expression pattern matching | No | The pattern matching behavior changed for some regular expressions using intersections in Java SE 17. |
The defineAnonymousClass method from sun.misc.Unsafe has been removed | No | The defineAnonymousClass method from sun.misc.Unsafe has been removed in Java SE 17.
|
Check for a behavior change in Java agents | Yes | Java agent premain and agentmain methods must be public in Java SE 17.
|
The Applet API has been deprecated for removal | No | The Applet API has been deprecated for removal in Java SE 17. |
JARs signed with SHA-1 algorithms are now restricted | No | JARs signed with SHA-1 algorithms are now restricted by default and treated as if they were unsigned in Java SE 17. |
Remote EJB calls might fail on Java SE 17 | No | Due to stricter module access enforcement, remote EJB calls might fail on Java SE 17. |
Oracle to IBM compatibility impacts
Run the following rules when you are migrating your application from an Oracle Java Runtime Environment to an IBM Java Runtime Environment. If you are running a Liberty server using an Oracle Java Runtime, do not run the quick fixes for these rules.
Rule Name | Quick Fix | Action Taken |
---|---|---|
Detect com.sun.net.ssl.internal packages | No | This rule flags import statements of certain com.sun.net.ssl.internal packages in Java files that are not available and should not be used. |
Do not use APIs from com.sun.net.ssl packages | Yes |
This rule detects the classes and interfaces in the
>com.sun.net.ssl
package have been replaced by classes and interfaces in the
javax.net.ssl
package.
|
Do not use com.sun.org.apache JAXP internal classes | No | This rule flags internal Sun JAXP classes are not available in the IBM Java Runtime Environment. |
Do not use com.sun.org.apache JAXP package names in string literals | No |
This rule detects
com.sun.org.apache
JAXP 1.3 package names that are used
in string literals.
|
Do not use the com.sun.net.ssl.internal.ssl.Provider class | Yes |
This rule flags the class
com.sun.net.ssl.internal.ssl.Provider
should be
replaced by
com.ibm.jsse.IBMJSSEProvider .
|
Do not use the com.sun.net.ssl.internal.www.protocol.https.Handler class | Yes |
This rule flags the
com.sun.net.ssl.internal.www.protocol.https.Handler
class that should be replaced by
com.ibm.net.ssl.www2.protocol.https.Handler .
|
Do not use the com.sun.net.ssl.internal.www.protocol package | Yes |
This rule flags the
com.sun.net.ssl.internal.www.protocol
package
references that should be replaced by
com.ibm.net.ssl.www2.protocol .
|
Sun internal APIs
Only run the following rules when you are migrating your application from an Oracle Java Runtime Environment to an IBM Java Runtime that contains the IBM class. For example, the HP-UX and Solaris Java Runtime Environment that ships with WebSphere Application Server does not contain the class. This rule is not selected automatically by any rule set.
Rule Name | Quick Fix | Action Taken |
---|---|---|
Do not use APIs from the sun.security.x509 package | Yes |
The classes and interfaces in the
sun.security.x509
package are replaced by
classes and interfaces in the
com.ibm.security.x509
package on some operating
systems.
|