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

View File

@@ -359,7 +359,6 @@ public class ChangeListServiceImpl extends BaseServiceImplementation implements
final AsyncCallback<SingleListChangeInfo> callback) { final AsyncCallback<SingleListChangeInfo> callback) {
run(callback, new Action<SingleListChangeInfo>() { run(callback, new Action<SingleListChangeInfo>() {
public SingleListChangeInfo run(final ReviewDb db) throws OrmException { public SingleListChangeInfo run(final ReviewDb db) throws OrmException {
final Account.Id me = getAccountId();
final AccountInfoCacheFactory ac = accountInfoCacheFactory.create(); final AccountInfoCacheFactory ac = accountInfoCacheFactory.create();
final SingleListChangeInfo d = new SingleListChangeInfo(); final SingleListChangeInfo d = new SingleListChangeInfo();
final Set<Change.Id> starred = currentUser.get().getStarredChanges(); 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 { public SingleListChangeInfo run(final ReviewDb db) throws OrmException {
final Account.Id me = getAccountId();
final AccountInfoCacheFactory ac = accountInfoCacheFactory.create(); final AccountInfoCacheFactory ac = accountInfoCacheFactory.create();
final SingleListChangeInfo d = new SingleListChangeInfo(); final SingleListChangeInfo d = new SingleListChangeInfo();
final Set<Change.Id> starred = currentUser.get().getStarredChanges(); 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.PatchSet;
import com.google.gerrit.reviewdb.PatchSetAncestor; import com.google.gerrit.reviewdb.PatchSetAncestor;
import com.google.gerrit.reviewdb.PatchSetApproval; import com.google.gerrit.reviewdb.PatchSetApproval;
import com.google.gerrit.reviewdb.Project;
import com.google.gerrit.reviewdb.RevId; import com.google.gerrit.reviewdb.RevId;
import com.google.gerrit.reviewdb.ReviewDb; import com.google.gerrit.reviewdb.ReviewDb;
import com.google.gerrit.server.account.AccountInfoCacheFactory; import com.google.gerrit.server.account.AccountInfoCacheFactory;
@@ -90,7 +89,6 @@ public class ChangeDetailFactory extends Handler<ChangeDetail> {
PatchSetInfoNotAvailableException, NoSuchChangeException { PatchSetInfoNotAvailableException, NoSuchChangeException {
control = changeControlFactory.validateFor(changeId); control = changeControlFactory.validateFor(changeId);
final Change change = control.getChange(); final Change change = control.getChange();
final Project proj = control.getProject();
final PatchSet patch = db.patchSets().get(change.currentPatchSetId()); final PatchSet patch = db.patchSets().get(change.currentPatchSetId());
if (patch == null) { if (patch == null) {
throw new NoSuchEntityException(); throw new NoSuchEntityException();

View File

@@ -60,7 +60,6 @@ class ListBranches extends Handler<List<Branch>> {
@Override @Override
public List<Branch> call() throws NoSuchProjectException, public List<Branch> call() throws NoSuchProjectException,
RepositoryNotFoundException { RepositoryNotFoundException {
final ProjectControl projectControl =
projectControlFactory.validateFor(projectName, ProjectControl.OWNER projectControlFactory.validateFor(projectName, ProjectControl.OWNER
| ProjectControl.VISIBLE); | ProjectControl.VISIBLE);

View File

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

View File

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

View File

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