IntelliJ IDEA
IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains
IntelliJ IDEA 2022.2 EAP 4: Improved Inspections and Code Completion for Java
IntelliJ IDEA 2022.2 EAP 4 is now out! This EAP build features Java-related updates that provide improved code completion and better code analysis via new inspections and quick-fixes.
Throughout the Early Access Program, we encourage you to test out all of the new features and share your thoughts and suggestions with us.
You can download the new build from our website, install it using the free Toolbox App, or get it using snaps if you’re a Ubuntu user.
Now, let’s get to the updates bundled inside the fourth EAP build.
Java
New Java inspections
Deep data flow analysis is now used in the ‘equals’ between objects of inconvertible types inspection. This can detect problems even if declared variable types are the same.
There’s a new inspection that warns you when pattern variables hide fields.
The Standard ‘Charset’ object can be used inspection has been improved and now recognizes .name() and .toString().
The IDE now provides better reporting and suggests a quick-fix when unexpected unboxing causes NullPointerException in a ternary operator.
Another new inspection catches meaningless Objects.requireNonNullElse calls.
We’ve also upgraded the Raw use of parameterized class inspection with a quick-fix that adds a diamond operator when constructing raw types.
The Javadoc declaration problems inspection got a new quick-fix to remove redundant @throws from documentation when the method doesn’t provide the throws section.
A number of JUnit-related Java inspections were converted to JVM inspections, so they are now also available in Kotlin. This includes the Unconstructable JUnit test class and JUnit malformed declaration.
Improved code completion
Code completion was improved and now works for .class literals where applicable.
These are the key updates for this week, and the full list of newly introduced changes is available in the release notes. Stay tuned for more improvements coming next week!
If you have any feedback to share or spot any bugs, please let us know in the comments below, on Twitter, or via our issue tracker.
Happy Developing!