Announcing support for Java 21

We are glad to announce that the DeepSource Java analyzer now supports Java 21!

Java 21 introduces several new features and improvements like Pattern matching for switch statements, Record Patterns, etc. The Java analyzer can now identify these new features while scanning your code and help you identify and fix issues in them.

To start using Java 21 with DeepSource, you can update your .deepsource.toml file to set the runtime_version or java_version property to "21".

More information on how to set these properties is available in the docs.

Note: Support for Java 21 is available for cloud users today. Enterprise Server users will receive this update in the upcoming release (mid May 2024).