Skip to content

Commit d69fbc8

Browse files
committed
Remove unneeded instanceof check
Repository implements Serializable and does not need to be explicitly checked before inserting into the bundle.
1 parent 836de09 commit d69fbc8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/src/main/java/com/github/mobile/ui/commit/CommitFileViewActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ private void loadMarkdown() {
262262
EncodingUtils.fromBase64(blob.getContent()));
263263
Bundle args = new Bundle();
264264
args.putCharSequence(ARG_TEXT, markdown);
265-
if (repo instanceof Serializable)
266-
args.putSerializable(ARG_REPO, (Serializable) repo);
265+
args.putSerializable(ARG_REPO, repo);
267266
getSupportLoaderManager().restartLoader(0, args, this);
268267
}
269268

app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ private void loadMarkdown() {
255255
EncodingUtils.fromBase64(blob.getContent()));
256256
Bundle args = new Bundle();
257257
args.putCharSequence(ARG_TEXT, markdown);
258-
if (repo instanceof Serializable)
259-
args.putSerializable(ARG_REPO, repo);
258+
args.putSerializable(ARG_REPO, repo);
260259
getSupportLoaderManager().restartLoader(0, args, this);
261260
}
262261

0 commit comments

Comments
 (0)