ReceiveCommits: Fix Eclipse warnings

- Declaration of unthrown exception
- Unnecessarily nested else-clause

Change-Id: I199090caeda76574780029234dae018dde672ccb
This commit is contained in:
David Pursehouse
2016-10-18 08:49:54 +09:00
parent 4b657d5c39
commit f2ed2a668c

View File

@@ -1838,11 +1838,10 @@ public class ReceiveCommits {
"commit(s) already exists (as current patchset)"); "commit(s) already exists (as current patchset)");
newChanges = Collections.emptyList(); newChanges = Collections.emptyList();
return; return;
} else { }
itr.remove(); itr.remove();
continue; continue;
} }
}
newChangeIds.add(p.changeKey); newChangeIds.add(p.changeKey);
} }
newChanges.add(new CreateRequest(p.commit, magicBranch.dest.get())); newChanges.add(new CreateRequest(p.commit, magicBranch.dest.get()));
@@ -1897,7 +1896,7 @@ public class ReceiveCommits {
} }
private boolean foundInExistingRef(Collection<Ref> existingRefs) private boolean foundInExistingRef(Collection<Ref> existingRefs)
throws OrmException, IOException { throws OrmException {
for (Ref ref : existingRefs) { for (Ref ref : existingRefs) {
ChangeNotes notes = notesFactory.create(db, project.getNameKey(), ChangeNotes notes = notesFactory.create(db, project.getNameKey(),
Change.Id.fromRef(ref.getName())); Change.Id.fromRef(ref.getName()));