aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test1/CalleeAfter3.java
blob: 068816c6117d316d3b746858bd1cdc83f2ad83a5 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
package test1;

public class CalleeAfter3 {
    int value = 1;
    public int m1(int k) {
        if (k > 3)
            return k;
        else
            return k + 1;
    }

    public String m2(int k) {
        if (k > 3)
            return "value" + k;
        else
            return "value" + value;
    }

    public void m3(int k) {
        if (k > 3)
            value += k;
        else
            value -= k;
    }

    public int m4(String obj) {
        try {
            return obj.length();
        }
        catch (NullPointerException e) {
            return 0;
        }
    }

    public int test() {
        m3(5);
        return m1(1) + m2(5).length() + value + m4("12345");
    }
}