summaryrefslogtreecommitdiffstats
path: root/tools/infer/test/autotest/src/main/java/Biabduction.java
blob: 22fd0a896b98a36fea41878805de49241dba5ed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import javax.annotation.Nullable;
import java.util.List;

public class Biabduction {
    private String get() { return null; }

    public void f1() {
        get().length(); // error
    }

    public void f2() {
        try {
            get().length(); // error
        } catch (NullPointerException e) {

        }
    }
}