Commit Graph

2 Commits

Author SHA1 Message Date
Nikita Eshkeev
0f5a1abe0f [inspection] IDEA-257415 Warnings for value-based classes (Java 16)
This renames ValueBasedWarningsInspection to SynchronizeOnValueBasedClassInspection and alters the logic, it checks first the original type of the monitor and if it's not a value-based class then it employs DFA to infer the type more precisely and checks the inferred type if it differs from the type of the monitor. This solution is more robust, because DFA might fail sometimes.

This patch also adds the suppressId to SynchronizeOnValueBasedClassInspection in order to support the new javac warning category.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: f7c3520b84bf6f9080280dc2689ff4f63ac4be09
2020-12-29 22:41:46 +00:00
Nikita Eshkeev
7760811391 [inspection] IDEA-257415 Warnings for value-based classes (Java 16)
This patch adds the inspection to detect usages of value-based classes' instances as monitors in the synchronize statement.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: 178533c1415b2a8f11d48db17c19baa7e6ff4d1a
2020-12-24 02:00:16 +00:00