Remove dead code identified by Eclipse 3.5.1

Change-Id: Ia15a6d777df6d8771c7b9524aba1e21c4e0e8d09
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-11-16 10:13:59 -08:00
parent 89c67cb6a2
commit ae98e8017f
7 changed files with 2 additions and 22 deletions

View File

@@ -291,7 +291,6 @@ class GitWebServlet extends HttpServlet {
}
final Map<String, String> params = getParameters(req);
final String action = params.get("a");
if (deniedActions.contains(params.get("a"))) {
rsp.sendError(HttpServletResponse.SC_FORBIDDEN);
return;
@@ -307,7 +306,6 @@ class GitWebServlet extends HttpServlet {
}
final ProjectControl project;
final boolean anonymousRead;
try {
final Project.NameKey nameKey = new Project.NameKey(name);
project = projectControl.validateFor(nameKey);

View File

@@ -359,7 +359,6 @@ public class ChangeListServiceImpl extends BaseServiceImplementation implements
final AsyncCallback<SingleListChangeInfo> callback) {
run(callback, new Action<SingleListChangeInfo>() {
public SingleListChangeInfo run(final ReviewDb db) throws OrmException {
final Account.Id me = getAccountId();
final AccountInfoCacheFactory ac = accountInfoCacheFactory.create();
final SingleListChangeInfo d = new SingleListChangeInfo();
final Set<Change.Id> starred = currentUser.get().getStarredChanges();
@@ -538,7 +537,6 @@ public class ChangeListServiceImpl extends BaseServiceImplementation implements
}
public SingleListChangeInfo run(final ReviewDb db) throws OrmException {
final Account.Id me = getAccountId();
final AccountInfoCacheFactory ac = accountInfoCacheFactory.create();
final SingleListChangeInfo d = new SingleListChangeInfo();
final Set<Change.Id> starred = currentUser.get().getStarredChanges();

View File

@@ -28,7 +28,6 @@ import com.google.gerrit.reviewdb.ChangeMessage;
import com.google.gerrit.reviewdb.PatchSet;
import com.google.gerrit.reviewdb.PatchSetAncestor;
import com.google.gerrit.reviewdb.PatchSetApproval;
import com.google.gerrit.reviewdb.Project;
import com.google.gerrit.reviewdb.RevId;
import com.google.gerrit.reviewdb.ReviewDb;
import com.google.gerrit.server.account.AccountInfoCacheFactory;
@@ -90,7 +89,6 @@ public class ChangeDetailFactory extends Handler<ChangeDetail> {
PatchSetInfoNotAvailableException, NoSuchChangeException {
control = changeControlFactory.validateFor(changeId);
final Change change = control.getChange();
final Project proj = control.getProject();
final PatchSet patch = db.patchSets().get(change.currentPatchSetId());
if (patch == null) {
throw new NoSuchEntityException();

View File

@@ -60,9 +60,8 @@ class ListBranches extends Handler<List<Branch>> {
@Override
public List<Branch> call() throws NoSuchProjectException,
RepositoryNotFoundException {
final ProjectControl projectControl =
projectControlFactory.validateFor(projectName, ProjectControl.OWNER
| ProjectControl.VISIBLE);
projectControlFactory.validateFor(projectName, ProjectControl.OWNER
| ProjectControl.VISIBLE);
final List<Branch> branches = new ArrayList<Branch>();
final Repository db = repoManager.openRepository(projectName.get());

View File

@@ -14,21 +14,15 @@
package com.google.gerrit.server.auth.ldap;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
abstract class LdapType {
static final LdapType RFC_2307 = new Rfc2307();
static LdapType guessType(final DirContext ctx) throws NamingException {
final SearchControls cons = new SearchControls();
final NamingEnumeration<SearchResult> res;
final Attributes rootAtts = ctx.getAttributes("");
Attribute supported = rootAtts.get("supportedCapabilities");
if (supported != null && supported.contains("1.2.840.113556.1.4.800")) {

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.server.git;
import com.google.gerrit.reviewdb.Branch;
import com.google.gerrit.reviewdb.Project;
import com.google.gerrit.reviewdb.ReviewDb;
import com.google.gerrit.server.config.Nullable;
@@ -27,7 +26,6 @@ import com.google.inject.assistedinject.Assisted;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashSet;
import java.util.concurrent.TimeUnit;
public class PushAllProjectsOp extends DefaultQueueOp {
@@ -63,7 +61,6 @@ public class PushAllProjectsOp extends DefaultQueueOp {
}
public void run() {
final HashSet<Branch.NameKey> pending = new HashSet<Branch.NameKey>();
try {
final ReviewDb db = schema.open();
try {

View File

@@ -49,8 +49,6 @@ final class ScpCommand extends BaseCommand {
private boolean opt_r;
private boolean opt_t;
private boolean opt_f;
private boolean opt_v;
private boolean opt_p;
private String root;
private TreeMap<String, Entry> toc;
@@ -70,7 +68,6 @@ final class ScpCommand extends BaseCommand {
opt_f = true;
break;
case 'p':
opt_p = true;
break;
case 'r':
opt_r = true;
@@ -79,7 +76,6 @@ final class ScpCommand extends BaseCommand {
opt_t = true;
break;
case 'v':
opt_v = true;
break;
}
}