summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/test/com/siyeh/igtest/numeric/DivideByZeroInspection.java
blob: c0267911c169d57dbc2f6ac4eeb7754f58e96396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.siyeh.igtest.numeric;

public class DivideByZeroInspection {
    private static final double Z = 0.0;

    public void foo()
    {
        double x = Math.sin(3.0);
        final double v = x / 0.0;
        final double y = x / Z;
        final double y2 = x % Z;

         double y3 = 4.0;
         y3 %= 0.0;
         y3 /= 0.0;
    }
}