java redundant cast: check conditional expression as call argument inplace

GitOrigin-RevId: ee7fa6ef4cac4e39e9dad97c7d5ace983bc81044
This commit is contained in:
Anna Kozlova
2020-05-11 08:33:17 +00:00
committed by intellij-monorepo-bot
parent e3bc888dc7
commit 7f02ca14a9
3 changed files with 85 additions and 54 deletions
@@ -0,0 +1,15 @@
class RedundantCastTest {
public static void main(String[] args) {
Integer bar = null;
print(() -> args == null || args.length == 0 ? bar : (Integer) 1);
}
private static void print(I i) {
Integer myI = i.get();
}
interface I {
Integer get();
}
}