mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
Division by zero handling removed from DataFlowInspection as DivideByZero inspection is smart enough now
15 lines
380 B
Java
15 lines
380 B
Java
class Util {
|
|
void goo(int a, int b) {
|
|
try {
|
|
a %= b;
|
|
if (<warning descr="Condition 'b == 0' is always 'false'">b == 0</warning>)return;
|
|
}
|
|
catch (Exception e) {
|
|
if (<warning descr="Condition 'e instanceof ArithmeticException' is always 'true'">e instanceof ArithmeticException</warning>){
|
|
System.out.println("expected");
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|