File: FlowInterning1.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 (16 lines) | stat: -rw-r--r-- 452 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * A test inspired by some problem in Daikon.
 */
public class FlowInterning1 {

    void test(String[] tokens, int i) {
        String arg_type_name = tokens[i].intern();
        if (i + 1 >= tokens.length) {
            throw new RuntimeException("No matching arg val for argument type " + arg_type_name);
        }
        String arg_val = tokens[i + 1];
        if (arg_type_name == "boolean") { // interned
            // ...
        }
    }
}