Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ab3d9e8

Browse filesBrowse files
committed
A little better version of the bridge method
1 parent b6063dd commit ab3d9e8
Copy full SHA for ab3d9e8

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎src/main/java/org/kohsuke/github/GHObject.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHObject.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ public long getId() {
9393
private Object longToStringOrInt(long id, Class type) {
9494
if (type==String.class)
9595
return String.valueOf(id);
96-
else
96+
if (type==int.class)
9797
return (int)id;
98+
throw new AssertionError("Unexpected type: "+type);
9899
}
99100

100101
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Bridge method of getHtmlUrl")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.