@@ -33,6 +33,7 @@ public void testBridgeMethods() throws IOException {
33
33
verifyBridgeMethods (GHIssue .class , "getCreatedAt" , Date .class , String .class );
34
34
verifyBridgeMethods (GHIssue .class , "getId" , int .class , long .class , String .class );
35
35
verifyBridgeMethods (GHIssue .class , "getUrl" , String .class , URL .class );
36
+ verifyBridgeMethods (GHIssue .class , "comment" , 1 , void .class , GHIssueComment .class );
36
37
37
38
verifyBridgeMethods (GHOrganization .class , "getHtmlUrl" , String .class , URL .class );
38
39
verifyBridgeMethods (GHOrganization .class , "getId" , int .class , long .class , String .class );
@@ -55,12 +56,17 @@ public void testBridgeMethods() throws IOException {
55
56
}
56
57
57
58
void verifyBridgeMethods (@ Nonnull Class <?> targetClass , @ Nonnull String methodName , Class <?>... returnTypes ) {
59
+ verifyBridgeMethods (targetClass , methodName , 0 , returnTypes );
60
+ }
61
+
62
+ void verifyBridgeMethods (@ Nonnull Class <?> targetClass ,
63
+ @ Nonnull String methodName ,
64
+ int parameterCount ,
65
+ Class <?>... returnTypes ) {
58
66
List <Class <?>> foundMethods = new ArrayList <>();
59
67
Method [] methods = targetClass .getMethods ();
60
68
for (Method method : methods ) {
61
- if (method .getName ().equalsIgnoreCase (methodName )) {
62
- // Bridge methods are only
63
- assertThat (method .getParameterCount (), equalTo (0 ));
69
+ if (method .getName ().equalsIgnoreCase (methodName ) && method .getParameterCount () == parameterCount ) {
64
70
foundMethods .add (method .getReturnType ());
65
71
}
66
72
}
0 commit comments