java redundant cast: cleanup: visitor finally inverted

GitOrigin-RevId: 8b4449e6d9163c24b046aad9065e5ec055d6d62c
This commit is contained in:
Anna Kozlova
2020-05-11 08:33:17 +00:00
committed by intellij-monorepo-bot
parent 78891be4bb
commit 1bc4cda08e
5 changed files with 131 additions and 87 deletions
@@ -5,5 +5,13 @@ class RedundantCast {
Object o = switch (matchType) {
default -> (Predicate<Object>) target -> target == null;
};
Predicate<Object> o1 = switch (matchType) {
default -> (<warning descr="Casting 'target -> {...}' to 'Predicate<Object>' is redundant">Predicate<Object></warning>) target -> target == null;
};
Predicate<Object> o2 = switch (matchType) {
default:
yield (<warning descr="Casting 'target -> {...}' to 'Predicate<Object>' is redundant">Predicate<Object></warning>) target -> target == null;
};
}
}