Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News JetBrains IntelliJ IDEA 2022.2 Uses Java 17 Runtime

JetBrains IntelliJ IDEA 2022.2 Uses Java 17 Runtime

Lire ce contenu en français


JetBrains has released IntelliJ IDEA 2022.2 featuring support for Java 17 and the latest languages and frameworks such as Scala, Kotlin, Spring 6 and Spring Boot 3.

This new release uses the JetBrains Runtime 17, a fork of OpenJDK 17, with performance improvements such as faster rendering thanks to the Metal API and improved vector computations from the Vector API. VoiceOver screen reader support increased accessibility on macOS and security was improved by using the latest OpenJDK LTS.

This release also introduces various improvements for Java inspections and code completion. Java inspections now recognize the name() and toString() methods of Charset and warn when variables hide fields and catch unnecessary Object.requireNonNullElse calls. Various JUnit inspections were converted to JVM inspections to support other languages such as Kotlin. Code completion now supports .class literals whenever applicable.

Support for features in Kotlin 1.7.0 is now available and IntelliJ improved rendering for definitely non-nullable types and improved inspection for opt-in requirements. The debugger is now integrated with the Data Flow Analysis functionality, which was already available for Java, in order to display hints about which conditions are true and which branches will be executed. From this version onwards the version of the Kotlin compiler defined in the project settings will be used to remove inconsistencies between local and CI builds. The performance of code highlighting, code completion and Find Usages was also improved.

Scala 3 features, such as Option-less extractors, type lambdas, type level compiler intrinsics, polymorphic functions, are now supported. IntelliJ now warns when the return keyword is used inside an anonymous function where part of the code isn't executed and when a private or class parameter shadows a superclass variable. The warnings may be used whenever the compiler options, -Xlint:nonlocal-return and -Xlint:private-shadow, are activated. The Safe Delete action, which allows removing an element from the definition and all calls, now supports type parameters. The Put arguments on separate lines action may be used to split a comma separated list into separate lines.

IntelliJ now provides syntax highlighting, code completion and inspection for Groovy-Integrated Query (GINQ) which was introduced in Groovy 4.

This release introduced various user experience improvements such as Run Current File, which allows to run or debug a single file, where the IDE automatically picks the right run configuration:

Newly introduced keyboard shortcuts Alt+Shift+Period and Alt+Shift+Comma allow users to increase and decrease the font size. The current font size is displayed together with an option to revert back to the default.

Configuring the way inspections appear in the editor is now possible, with the Highlighting in editor drop-down, without changing the severity level.

Code Completion Settings are now available by pressing on the three vertical dots in the code completion popup:

The Close block comment setting on Settings | Editor | Smart Keys may now be used to disable the automatic closure of block comments:

Generating a table of content for Markdown files, based on the document headers, is now possible via the Insert and Generate popup by pressing Alt+Insert or a right click.

Image completion for Docker images in Testcontainer tests allows the user to select the name and version of the Docker image. The new Copy Docker Image action saves the image to a file and then pushes it from one docker daemon to another. Now, after a restart, IntelliJ IDEA automatically connects to the Docker daemon, which can be disabled via Advanced Settings | Docker.

The previously mentioned improvements are available in all IntelliJ IDEA downloads. What follows is a list of improvements only available in IntelliJ IDEA Ultimate.

This version fully supports Spring Boot 3, scheduled for release in November, and Spring 6 which now require Java 17. Spring 6 may be used to create an HTTP client as a Java interface with annotated methods, where the IDE provides URL completion and navigation.

The experimental GraalVM Native Debugger may be used to debug native Java image binaries. It requires a development build of GraalVM and the GraalVM Native Debugger plugin should be installed.

Remote development, which allows creating connections to remote environments, is improved and connections are more stable.

While profiling, the CPU and Heap Memory charts are now displayed next to the console, giving insight into the applications performance while at the same time collecting snapshots. The Start profiling option now displays Kotlin's inline functions in the Flame Graph, Call Tree and Method List.

The Kubernetes plugin now integrates with Telepresence and allows debugging of services in a Kubernetes cluster by intercepting the HTTP requests.

Even further, IntelliJ now supports Angular 14's standalone components, Vue 3 and TypeScript 4.7.

A complete overview of all the changes for IntelliJ IDEA 2022.2 may be found at the What's New section of the JetBrains website.

About the Author

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p