File: StateMatch.java

package info (click to toggle)
checker-framework-java 3.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,840 kB
  • sloc: java: 145,910; xml: 839; sh: 518; makefile: 401; perl: 26
file content (26 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
public class StateMatch {
    private int num_elts = 0;

    @SuppressWarnings("nullness")
    private double[][] elts = null;

    @SuppressWarnings({
        "Interning",
        "index"
    }) // This code is inherently unsafe for the index checker, but adding index annotations
    // produces warnings for other checkers (fenum)
    public boolean state_match(Object state) {
        if (!(state instanceof double[][])) {
            System.out.println("");
        }

        double[][] e = (double[][]) state;
        boolean match = false;
        if (elts[0] == e[0]) {
            // When analyzing this statement, we get an exception about taking
            // the LUB of ATMs with empty sets of qualifiers.
            match = true;
        }
        return (true);
    }
}