summaryrefslogtreecommitdiff
path: root/java/typeMigration/testData/refactoring/typeMigration/t90/after/test.java
blob: 06c072088b02e11a69797c9023f5dc50e5cff9fe (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
import java.util.*;
public class Test {
    List<A> l;

    @Override
    Map<String, String> foo() {
        HashMap<String, String> m = new HashMap<String, String>();
        for (A b : l) {
            Map<String, String> map = b.foo();
            for (Map.Entry<String, String> entry : map.entrySet()) {
                if (!m.containsKey(entry.getKey())) {
                    m.put(entry.getKey(), entry.getValue());
                }
            }
        }
        return m;
    }
}

class A {
    Map<String, String> foo(){return null;}
}

class B extends A {}