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
- 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-bindingwhen both MapStruct and Lombok are used - Add missing
isWrapperForandunwrapmethods. - Adds missing JDBC interface methods.
- Adopt
javax.security.auth.Subject.current()andjavax.security.auth.Subject.callAs()methods` - Adopt
setLongThreadIDinjava.util.logging.LogRecord - Adopt switch pattern matching (JEP 441)
- Avoid using the deprecated empty
finalize()method injava.desktop - Change
java.lang.reflect.Modifierandjava.lang.invoke.ConstantBootstrapsmethod calls to static - Do not package
java.xml.bindandjava.activationmodules in WebSphere Liberty applications - Do not package
java.xml.wsmodule in WebSphere Liberty applications - Migrate Bouncy Castle from
jdk15ontojdk15to18for Java < 8 - Migrate Bouncy Castle to
jdk18on - Migrate to IBM Semeru Runtimes
- Migrate to Java 11
- Migrate to Java 17
- Migrate to Java 21
- Migrate to Java 25
- Migrate to Java 6
- Migrate to Java 7
- Migrate to Java 8
- Migrate to JavaEE7
- Migrate to JavaEE8
- Remove
Runtime.traceInstructions(boolean)andRuntime.traceMethodCallsmethods - Remove Security AccessController
- Remove Security Policy
- Remove Security SecurityManager
- Remove
Thread.destroy()andThread.stop(Throwable) - Replace
System.getSecurityManager()withnull - Replace
finalizemethod injava.io.FileInputStreamandjava.io.FileOutputStream - Replace
finalizemethod injava.util.zip.ZipFile,java.util.zip.Inflaterandjava.util.zip.Deflater - Set visibility of
premainandagentmainmethods topublic - Update
jakarta.annotation-apidependency if it exists - Update
jakarta.annotation-apidependency if it exists - 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
ZipExceptioninstead ofZipError - Use
com.ibm.jsse2instead ofcom.sun.net.ssl.internal.ssl
Recipes
- Add
JDeprScanMaven Plug-in - Add maven jar plugin to suppress illegal reflection warnings
- Adds missing method implementations
- Adds
staticmodifier to@Producesfields that are in session beans - Behavior change to bean discovery in modules with
beans.xmlfile with no version specified - Catch
TypeNotPresentExceptionthrown byClass.getAnnotation() - Change
beans.xmlschemaLocationto match XML namespace - Change
javax.tools.ToolProvidermethods calls to static - Change method invocation return type
- Change
net.wasdev.maven.parent:java8-parentto:parent - Disable the persistence unit second-level cache
- Force indentation to either tabs or spaces
- MBean and MXBean interfaces must be public
- Migrate com.intellij:annotations to org.jetbrains:annotations
- Migrate from IBM Runtimes to Oracle Runtimes
- Migrate to JavaEE6
- Prefer
java.util.Base64instead 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
IllegalArgumentExceptionwithAlreadyConnectedExceptioninDatagramChannel.send()method - Replace
RMIConnectorServer.CREDENTIAL_TYPESconstant - Replace
SSLSession.getPeerCertificateChain()method - Replace
Stringliteral - Replace
com.sun.awt.AWTUtilitiesstatic method invocations - Replace
com.sun.net.sslpackage - Replace deprecated methods in
SecurityManager - Replace
getLocalizedInputStreamandgetLocalizedOutputStreamwith direct assignment - Replace
java.lang.ref.Reference.clone()with constructor call - Replace
javax.security.auth.Policywithjava.security.Policy - Return String
jkswhenKeyStore.getDefaultType()is called - Update SDKMan Java version
- Upgrade build to Java 11
- Upgrade build to Java 17
- Upgrade build to Java 21
- Use
SunJSSEinstead ofcom.sun.net.ssl.internal.ssl.Provider - Use
com.ibm.net.ssl.www2.protocolinstead ofcom.sun.net.ssl.internal.www.protocol - Use
com.ibm.net.ssl.www2.protocol.https.Handlerinstead ofcom.sun.net.ssl.internal.www.protocol.https.Handler - Use
com.sun.security.auth.module.Krb5LoginModuleinstead ofcom.ibm.security.auth.module.Krb5LoginModule - Use
com.sun.xml.bind.*instead ofcom.sun.xml.internal.bind.* - Use
java.security.certinstead ofjavax.security.cert - Use
javax.net.sslinstead ofcom.sun.net.ssl