Modernize
Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.
Categories
- Cobertura
- Guava
- JaCoCo
- Jakarta
- Javaee7
- Javaee8
- Joda
- Lombok
- Maven
- Metrics
- Nio
- Search
- java.io APIs
- java.lang APIs
- java.net APIs
- java.sql APIs
- java.util APIs
- java.util.concurrent APIs
- java.util.logging APIs
- javax APIs
Composite Recipes
Recipes that include further recipes, often including the individual recipes below.
- Add
lombok-mapstruct-binding
when both MapStruct and Lombok are used - Add missing
isWrapperFor
andunwrap
methods. - Adds missing JDBC interface methods.
- Adopt
javax.security.auth.Subject.current()
andjavax.security.auth.Subject.callAs()
methods` - Adopt
setLongThreadID
injava.util.logging.LogRecord
- Avoid using the deprecated empty
finalize()
method injava.desktop
- Change
java.lang.reflect.Modifier
andjava.lang.invoke.ConstantBootstraps
method calls to static - Do not use
java.xml.bind
andjava.activation
modules in WebSphere Liberty - Migrate to IBM Semeru Runtimes
- Migrate to Java 11
- Migrate to Java 17
- Migrate to Java 21
- Migrate to Java 7
- Migrate to Java 8
- Migrate to JavaEE7
- Migrate to JavaEE8
- Remove
Runtime.traceInstructions(boolean)
andRuntime.traceMethodCalls
methods - Remove
Thread.destroy()
andThread.stop(Throwable)
- Replace
finalize
method injava.io.FileInputStream
andjava.io.FileOutputStream
- Replace
finalize
method injava.util.zip.ZipFile
,java.util.zip.Inflater
andjava.util.zip.Deflater
- Set visibility of
premain
andagentmain
methods topublic
- Upgrade Java version
- Upgrade plugins to Java 11 compatible versions
- Upgrade plugins to Java 17 compatible versions
- Upgrade plugins to Java 21 compatible versions
- Use
com.ibm.jsse2
instead ofcom.sun.net.ssl.internal.ssl
Recipes
- Add
JDeprScan
Maven Plug-in - Add maven jar plugin to suppress illegal reflection warnings
- Adds missing method implementations
- Behavior change to bean discovery in modules with
beans.xml
file with no version specified - Catch
TypeNotPresentException
thrown byClass.getAnnotation()
- Change
beans.xml
schemaLocation
to match XML namespace - Change
javax.tools.ToolProvider
methods calls to static - Change method invocation return type
- Disable the persistence unit second-level cache
- Do not use
java.xml.ws
module in WebSphere Liberty - Force indentation to either tabs or spaces
- MBean and MXBean interfaces must be public
- Migrate from IBM Runtimes to Oracle Runtimes
- Migrate to Java 6
- Migrate to JavaEE6
- Prefer
java.util.Base64
instead ofsun.misc
- Remove
Thread.countStackFrames()
method - Remove explicit casts on
Arrays.asList(..).toArray()
- Remove illegal semicolons
- Rename final method declarations
getSuppressed()
andaddSuppressed(Throwable exception)
in classes that extendThrowable
- Replace AWT
getPeer()
method - Replace DTO method parameters with data elements
- Replace
IllegalArgumentException
withAlreadyConnectedException
inDatagramChannel.send()
method - Replace
RMIConnectorServer.CREDENTIAL_TYPES
constant - Replace
SSLSession.getPeerCertificateChain()
method - Replace
String
literal - Replace
com.sun.awt.AWTUtilities
static method invocations - Replace
com.sun.net.ssl
package - Replace deprecated methods in
SecurityManager
- Replace
getLocalizedInputStream
andgetLocalizedOutputStream
with direct assignment - Replace
java.lang.ref.Reference.clone()
with constructor call - Replace
javax.security.auth.Policy
withjava.security.Policy
- Upgrade build to Java 11
- Upgrade build to Java 17
- Upgrade build to Java 21
- Use
SunJSSE
instead ofcom.sun.net.ssl.internal.ssl.Provider
- Use
com.ibm.net.ssl.www2.protocol
instead ofcom.sun.net.ssl.internal.www.protocol
- Use
com.ibm.net.ssl.www2.protocol.https.Handler
instead ofcom.sun.net.ssl.internal.www.protocol.https.Handler
- Use
com.sun.security.auth.module.Krb5LoginModule
instead ofcom.ibm.security.auth.module.Krb5LoginModule
- Use
com.sun.xml.bind.*
instead ofcom.sun.xml.internal.bind.*
- Use
java.security.cert
instead ofjavax.security.cert
- Use
javax.net.ssl
instead ofcom.sun.net.ssl