diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java b/app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java index f131a79b..f129f194 100644 --- a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java +++ b/app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java @@ -57,9 +57,10 @@ public void testEqualFilter() { assertEquals(filter1.hashCode(), filter2.hashCode()); Milestone milestone = new Milestone().setNumber(3); - filter1.setMilestone(milestone); + com.github.mobile.api.model.Milestone extraMilestone = new com.github.mobile.api.model.Milestone(milestone); + filter1.setMilestone(extraMilestone); assertFalse(filter1.equals(filter2)); - filter2.setMilestone(milestone); + filter2.setMilestone(extraMilestone); assertEquals(filter1, filter2); assertEquals(filter1.hashCode(), filter2.hashCode()); } diff --git a/app/src/main/java/com/github/mobile/api/model/Milestone.java b/app/src/main/java/com/github/mobile/api/model/Milestone.java index 4200e2d7..776aade9 100644 --- a/app/src/main/java/com/github/mobile/api/model/Milestone.java +++ b/app/src/main/java/com/github/mobile/api/model/Milestone.java @@ -57,7 +57,8 @@ public Milestone(org.eclipse.egit.github.core.Milestone milestone) { this.state = milestone.getState(); this.title = milestone.getTitle(); this.description = milestone.getDescription(); - this.creator = new User(milestone.getCreator()); + org.eclipse.egit.github.core.User creator = milestone.getCreator(); + this.creator = creator == null ? null : new User(creator); this.open_issues = milestone.getOpenIssues(); this.closed_issues = milestone.getClosedIssues(); this.created_at = milestone.getCreatedAt(); diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java b/app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java index df4b81d5..c6c491eb 100644 --- a/app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java +++ b/app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java @@ -236,9 +236,9 @@ private void updateLabels() { } private void updateMilestone() { - Milestone selected = filter.getMilestone().getOldModel(); + com.github.mobile.api.model.Milestone selected = filter.getMilestone(); if (selected != null) - milestoneText.setText(selected.getTitle()); + milestoneText.setText(selected.getOldModel().getTitle()); else milestoneText.setText(R.string.none); }