Minor JavaCodeClarity change

Change-Id: Ie6d3e2cfb5c5e0be8c4f5455b4e56db8f6f54c44
This commit is contained in:
Youssef Elghareeb
2019-12-17 12:26:42 +01:00
parent 9a07681dc2
commit 0c6f38a8a3

View File

@@ -74,11 +74,11 @@ import com.google.inject.Inject;
import com.google.inject.Provider;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;
@@ -341,7 +341,7 @@ public class RevertSubmission
ObjectId startCommit =
git.getRefDatabase().findRef(changeNotes.getChange().getDest().branch()).getObjectId();
Queue<ObjectId> commitsToSearch = new LinkedList<>();
Queue<ObjectId> commitsToSearch = new ArrayDeque<>();
commitsToSearch.add(startCommit);
while (!commitsToSearch.isEmpty()) {
@@ -433,7 +433,8 @@ public class RevertSubmission
// reverting.
throw new StorageException(
String.format(
"Couldn't find a non-merge commit after encountering commit %s when trying to revert the submission of change %d",
"Couldn't find a non-merge commit after encountering commit %s when trying to revert"
+ " the submission of change %d",
potentialCommitToReturn.getName(), changeNotes.getChange().getChangeId()));
}