diff options
author | Andy Clement <aclement@pivotal.io> | 2016-11-07 13:04:55 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-11-07 13:04:55 -0800 |
commit | de34df77ea7f7372894cf1e2352766118a798e98 (patch) | |
tree | e0d75970e19c61af1ba204810ee1ebebbd1e8166 /tests/bugs1810 | |
parent | 64c97807a20105644f604fe9b5263acdb63bd41d (diff) | |
download | aspectj-de34df77ea7f7372894cf1e2352766118a798e98.tar.gz aspectj-de34df77ea7f7372894cf1e2352766118a798e98.zip |
Upgraded to new JDT compiler - neon.1 and a bit
Diffstat (limited to 'tests/bugs1810')
-rw-r--r-- | tests/bugs1810/502807/TestCollectors.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs1810/502807/TestCollectors.java b/tests/bugs1810/502807/TestCollectors.java new file mode 100644 index 000000000..323fb76ce --- /dev/null +++ b/tests/bugs1810/502807/TestCollectors.java @@ -0,0 +1,36 @@ +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Collectors; + +public class TestCollectors { + Set<Integer> ids; + + public TestCollectors(Set<Inner> inners) { + ids = inners.stream().collect(Collectors.toList(Inner::getId)); +// ids = inners.stream().map(Inner::getId).collect(Collectors.toSet()); + } + + public static void main() { + Set<Inner> inners = new HashSet<>(); + inners.add(new Inner(1, "a")); + inners.add(new Inner(1, "a")); + + new TestCollectors(inners); + } + + + public static class Inner { + private int id; + private String name; + + public Inner(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { return id; } + + public String getName() { return name; } + } +} + |