@@ -33,6 +33,7 @@ public void testBridgeMethods() throws IOException {
3333 verifyBridgeMethods (GHIssue .class , "getCreatedAt" , Date .class , String .class );
3434 verifyBridgeMethods (GHIssue .class , "getId" , int .class , long .class , String .class );
3535 verifyBridgeMethods (GHIssue .class , "getUrl" , String .class , URL .class );
36+ verifyBridgeMethods (GHIssue .class , "comment" , 1 , void .class , GHIssueComment .class );
3637
3738 verifyBridgeMethods (GHOrganization .class , "getHtmlUrl" , String .class , URL .class );
3839 verifyBridgeMethods (GHOrganization .class , "getId" , int .class , long .class , String .class );
@@ -55,12 +56,17 @@ public void testBridgeMethods() throws IOException {
5556 }
5657
5758 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 ) {
5866 List <Class <?>> foundMethods = new ArrayList <>();
5967 Method [] methods = targetClass .getMethods ();
6068 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 ) {
6470 foundMethods .add (method .getReturnType ());
6571 }
6672 }
0 commit comments