File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
japicmp-test-v1/src/main/java/japicmp/test
japicmp-test-v2/src/main/java/japicmp/test
japicmp-test/src/test/java/japicmp/test Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -67,4 +67,8 @@ public <X extends List<Integer> & Serializable & MyInterface<Integer>> X methodW
6767public static class NewImplementsSupplier {
6868
6969}
70+
71+ public static class NewImplementsConsumer {
72+
73+ }
7074}
Original file line number Diff line number Diff line change 22
33import java .util .List ;
44import java .util .Map ;
5+ import java .util .function .Consumer ;
56import java .util .function .Supplier ;
67
78public class Generics <T , U extends List <Long >> {
@@ -71,4 +72,12 @@ public String get() {
7172return "" ;
7273}
7374}
75+
76+ public static class NewImplementsConsumer implements Consumer <String > {
77+
78+ @ Override
79+ public void accept (String s ) {
80+
81+ }
82+ }
7483}
Original file line number Diff line number Diff line change @@ -32,4 +32,13 @@ void testNewImplementsSupplier() {
3232assertThat (jApiClass .getCompatibilityChanges ().size (), is (1 ));
3333assertThat (jApiClass .getCompatibilityChanges (), hasItem (new JApiCompatibilityChange (JApiCompatibilityChangeType .INTERFACE_ADDED )));
3434}
35+
36+ @ Test
37+ void testNewImplementsConsumer () {
38+ JApiClass jApiClass = getJApiClass (jApiClasses , Generics .NewImplementsConsumer .class .getName ());
39+ assertThat (jApiClass .getCompatibilityChanges ().size (), is (2 ));
40+ assertThat (jApiClass .getCompatibilityChanges (), hasItem (new JApiCompatibilityChange (JApiCompatibilityChangeType .INTERFACE_ADDED )));
41+ // Consumer.andThen()
42+ assertThat (jApiClass .getCompatibilityChanges (), hasItem (new JApiCompatibilityChange (JApiCompatibilityChangeType .METHOD_DEFAULT_ADDED_IN_IMPLEMENTED_INTERFACE )));
43+ }
3544}
You can’t perform that action at this time.
0 commit comments