A little better version of the bridge method

This commit is contained in:
Kohsuke Kawaguchi
2017-10-28 08:43:48 -07:00
parent b6063dd534
commit ab3d9e82ef

View File

@@ -93,8 +93,9 @@ public abstract class GHObject {
private Object longToStringOrInt(long id, Class type) {
if (type==String.class)
return String.valueOf(id);
else
if (type==int.class)
return (int)id;
throw new AssertionError("Unexpected type: "+type);
}
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Bridge method of getHtmlUrl")