Fix Eclipse warnings about unnecessary else clauses

Change-Id: Id434cd7c7a7ea23e6ecf80b1c747173d278d13a9
This commit is contained in:
Dave Borowitz 2016-07-22 15:47:03 -04:00
parent 9448ed4c81
commit b86c905fd6

View File

@ -337,9 +337,8 @@ public class SubmoduleOp {
if (r == null) {
throw new SubmoduleException(
"The branch was probably deleted from the subscriber repository");
} else {
currentCommit = or.rw.parseCommit(r.getObjectId());
}
currentCommit = or.rw.parseCommit(r.getObjectId());
StringBuilder msgbuf = new StringBuilder("");
PersonIdent author = null;
@ -361,7 +360,7 @@ public class SubmoduleOp {
// Gitlinks are already in the branch, return null
if (newTreeId.equals(currentCommit.getTree())) {
return null;
} else {
}
CommitBuilder commit = new CommitBuilder();
commit.setTreeId(newTreeId);
commit.setParentId(currentCommit);
@ -375,7 +374,6 @@ public class SubmoduleOp {
ObjectId id = or.ins.insert(commit);
return or.rw.parseCommit(id);
}
}
/**
* Amend an existing commit with gitlink updates
@ -402,7 +400,7 @@ public class SubmoduleOp {
// Gitlinks are already updated, just return the commit
if (newTreeId.equals(currentCommit.getTree())) {
return currentCommit;
} else {
}
or.rw.parseBody(currentCommit);
CommitBuilder commit = new CommitBuilder();
commit.setTreeId(newTreeId);
@ -418,7 +416,6 @@ public class SubmoduleOp {
ObjectId id = or.ins.insert(commit);
return or.rw.parseCommit(id);
}
}
private RevCommit updateSubmodule(DirCache dc, DirCacheEditor ed,
StringBuilder msgbuf, final SubmoduleSubscription s)
@ -457,7 +454,7 @@ public class SubmoduleOp {
if (Objects.equals(newCommit, oldCommit)) {
// gitlink have already been updated for this submodule
return null;
} else {
}
ed.add(new PathEdit(s.getPath()) {
@Override
public void apply(DirCacheEntry ent) {
@ -472,7 +469,6 @@ public class SubmoduleOp {
subOr.rw.parseBody(newCommit);
return newCommit;
}
}
private void createSubmoduleCommitMsg(StringBuilder msgbuf,
SubmoduleSubscription s, OpenRepo subOr, RevCommit newCommit, RevCommit oldCommit)
@ -534,9 +530,8 @@ public class SubmoduleOp {
throw new SubmoduleException(
"Project level circular subscriptions detected: " +
printCircularPath(projects, project));
} else {
projects.add(project);
}
projects.add(project);
}
prev = project;
}