Browse Source

BatchRefUpdate: Remove unused namesToCheck variable

This variable has been populated and never used since it was
introduced in commit 5cf53fdacf
(Speed up clone/fetch with large number of refs, 2013-02-18).
Noted by FindBugs:
"BatchRefUpdate.java:359, UC_USELESS_OBJECT, Priority: Normal"

Change-Id: I7aacb49540aaee4a83db3d38b15633bb6c4773d0
Signed-off-by: Dan Wang <dwwang@google.com>
stable-4.5
Dan Wang 8 years ago committed by Jonathan Nieder
parent
commit
0d2a7b7737
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java

2
org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java

@ -336,7 +336,6 @@ public class BatchRefUpdate {
monitor.beginTask(JGitText.get().updatingReferences, commands.size()); monitor.beginTask(JGitText.get().updatingReferences, commands.size());
List<ReceiveCommand> commands2 = new ArrayList<ReceiveCommand>( List<ReceiveCommand> commands2 = new ArrayList<ReceiveCommand>(
commands.size()); commands.size());
List<String> namesToCheck = new ArrayList<String>(commands.size());
// First delete refs. This may free the name space for some of the // First delete refs. This may free the name space for some of the
// updates. // updates.
for (ReceiveCommand cmd : commands) { for (ReceiveCommand cmd : commands) {
@ -345,7 +344,6 @@ public class BatchRefUpdate {
cmd.updateType(walk); cmd.updateType(walk);
switch (cmd.getType()) { switch (cmd.getType()) {
case CREATE: case CREATE:
namesToCheck.add(cmd.getRefName());
commands2.add(cmd); commands2.add(cmd);
break; break;
case UPDATE: case UPDATE:

Loading…
Cancel
Save