1

Recently, the Beta 2 version of IDEA 2022.1 was released! Let's take a look at the important updates for us Java developers.

Java enhancements

With the official release of Java 18, IDEA quickly followed in that release. Currently supported features include:

@snippet tag

To simplify including example source code in API documentation, the @Snipket tag for the standard Doclet for JavaDoc was introduced in JDK 18. So, in this version, it is possible to add some sample code in the comments like below.

switch enhancement

The Switch expression pattern matching specification, introduced in JDK 17, has also been updated this time around, and both basic updates are supported in this version of IntelliJ IDEA.

other updates

  1. In JDK18, the default character set is directly UTF-8, instead of having different default character sets depending on the platform.
  2. Non-static inner classes will not catch unused this , so the warning will no longer be triggered

JUnit 5 enhancements

Added support for new features introduced in JUnit 5.7 , including support for @EnabledIf/DisabledIf , @NullSource/emptySource and @TempDir annotations.

Editor optimization

Implemented "Incorrect formatting" detection, IDEA will notify the developer if the current format of the file does not match the code style settings. You can configure it on or off in the following ways.

Only some of the DD concerns are listed here, and there are some other updates. You can view the full information through the links in the references.

References

Welcome to my public account: Programmer DD. Learn about cutting-edge industry news for the first time, share in-depth technical dry goods, and obtain high-quality learning resources

程序猿DD
2.2k 声望2.8k 粉丝

作品:《Spring Cloud微服务实战》、SpringForAll社区、OpenWrite、Youtube中文配音