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
- In JDK18, the default character set is directly UTF-8, instead of having different default character sets depending on the platform.
- 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
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。