mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
A little better version of the bridge method
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user