Remove dead code and unused variables
Change-Id: If87f7ad452ce597c82872b36a76f32afcc6ab7fd
This commit is contained in:
parent
c7a1d91dd7
commit
8bc0d7d481
@ -268,12 +268,9 @@ public class GerritDebugLauncher extends ServletContainerLauncher {
|
||||
private final ClassLoader systemClassLoader =
|
||||
Thread.currentThread().getContextClassLoader();
|
||||
|
||||
private final TreeLogger logger;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private MyWebAppContext(TreeLogger logger, String webApp, String contextPath) {
|
||||
private MyWebAppContext(String webApp, String contextPath) {
|
||||
super(webApp, contextPath);
|
||||
this.logger = logger;
|
||||
|
||||
// Prevent file locking on Windows; pick up file changes.
|
||||
getInitParams().put(
|
||||
@ -397,7 +394,7 @@ public class GerritDebugLauncher extends ServletContainerLauncher {
|
||||
// Create a new web app in the war directory.
|
||||
//
|
||||
WebAppContext wac =
|
||||
new MyWebAppContext(logger, warDir.getAbsolutePath(), "/");
|
||||
new MyWebAppContext(warDir.getAbsolutePath(), "/");
|
||||
wac.setDescriptor(webxml.getAbsolutePath());
|
||||
|
||||
RequestLogHandler logHandler = new RequestLogHandler();
|
||||
|
@ -665,13 +665,6 @@ public class AccountGroupScreen extends AccountScreen {
|
||||
}
|
||||
}
|
||||
|
||||
void insertMember(final AccountGroupMember k) {
|
||||
final int row = table.getRowCount();
|
||||
table.insertRow(row);
|
||||
applyDataRowStyle(row);
|
||||
populate(row, k);
|
||||
}
|
||||
|
||||
void display(final List<AccountGroupMember> result) {
|
||||
while (1 < table.getRowCount())
|
||||
table.removeRow(table.getRowCount() - 1);
|
||||
@ -750,13 +743,6 @@ public class AccountGroupScreen extends AccountScreen {
|
||||
}
|
||||
}
|
||||
|
||||
void insertMember(final AccountGroupInclude k) {
|
||||
final int row = table.getRowCount();
|
||||
table.insertRow(row);
|
||||
applyDataRowStyle(row);
|
||||
populate(row, k);
|
||||
}
|
||||
|
||||
void display(final List<AccountGroupInclude> result) {
|
||||
while (1 < table.getRowCount())
|
||||
table.removeRow(table.getRowCount() - 1);
|
||||
|
@ -15,7 +15,6 @@
|
||||
package com.google.gerrit.httpd.auth.container;
|
||||
|
||||
import com.google.gerrit.common.PageLinks;
|
||||
import com.google.gerrit.httpd.WebSession;
|
||||
import com.google.gerrit.server.config.CanonicalWebUrl;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
@ -41,13 +40,10 @@ import javax.servlet.http.HttpServletResponse;
|
||||
public class HttpsClientSslCertLoginServlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final Provider<WebSession> webSession;
|
||||
private final Provider<String> urlProvider;
|
||||
|
||||
@Inject
|
||||
public HttpsClientSslCertLoginServlet(final Provider<WebSession> webSession,
|
||||
@CanonicalWebUrl @Nullable final Provider<String> urlProvider) {
|
||||
this.webSession = webSession;
|
||||
public HttpsClientSslCertLoginServlet(@CanonicalWebUrl @Nullable final Provider<String> urlProvider) {
|
||||
this.urlProvider = urlProvider;
|
||||
}
|
||||
|
||||
|
@ -80,10 +80,6 @@ public class ToolServlet extends HttpServlet {
|
||||
rsp.setDateHeader(HDR_EXPIRES, 0L);
|
||||
rsp.setHeader(HDR_PRAGMA, "no-cache");
|
||||
rsp.setHeader(HDR_CACHE_CONTROL, "no-cache, must-revalidate");
|
||||
if (false) {
|
||||
rsp.setHeader("Content-Disposition", "attachment; filename=\""
|
||||
+ ent.getName() + "\"");
|
||||
}
|
||||
rsp.setContentType("application/octet-stream");
|
||||
rsp.setContentLength(tosend.length);
|
||||
final OutputStream out = rsp.getOutputStream();
|
||||
|
@ -103,7 +103,6 @@ class AccountServiceImpl extends BaseServiceImplementation implements
|
||||
AsyncCallback<VoidResult> callback) {
|
||||
run(callback, new Action<VoidResult>(){
|
||||
public VoidResult run(ReviewDb db) throws OrmException {
|
||||
Account.Id accountId = getAccountId();
|
||||
if (!diffPref.getAccountId().equals(getAccountId())) {
|
||||
throw new IllegalArgumentException("diffPref.getAccountId() "
|
||||
+ diffPref.getAccountId() + " doesn't match"
|
||||
|
@ -14,8 +14,6 @@
|
||||
|
||||
package com.google.gerrit.pgm.init;
|
||||
|
||||
import static com.google.gerrit.pgm.init.InitUtil.dnOf;
|
||||
|
||||
import com.google.gerrit.pgm.util.ConsoleUI;
|
||||
import com.google.gerrit.reviewdb.AuthType;
|
||||
import com.google.inject.Inject;
|
||||
@ -74,10 +72,6 @@ class InitAuth implements InitStep {
|
||||
|
||||
ldap.string("LDAP username", "username", null);
|
||||
ldap.password("username", "password");
|
||||
|
||||
final String def_dn = dnOf(server);
|
||||
String aBase = ldap.string("Account BaseDN", "accountBase", def_dn);
|
||||
String gBase = ldap.string("Group BaseDN", "groupBase", aBase);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -84,8 +84,6 @@ abstract class LdapType {
|
||||
}
|
||||
|
||||
private static class ActiveDirectory extends LdapType {
|
||||
private final String defaultDomain;
|
||||
|
||||
ActiveDirectory(final Attributes atts) throws NamingException {
|
||||
// Convert "defaultNamingContext: DC=foo,DC=example,DC=com" into
|
||||
// the a standard DNS name as we would expect to find in the suffix
|
||||
@ -105,7 +103,6 @@ abstract class LdapType {
|
||||
b.append(n.substring(3));
|
||||
}
|
||||
}
|
||||
defaultDomain = b.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1918,14 +1918,6 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
|
||||
cmd.setResult(ReceiveCommand.Result.REJECTED_OTHER_REASON, why);
|
||||
}
|
||||
|
||||
private static boolean isTag(final Ref ref) {
|
||||
return ref.getName().startsWith(Constants.R_TAGS);
|
||||
}
|
||||
|
||||
private static boolean isTag(final ReceiveCommand cmd) {
|
||||
return cmd.getRefName().startsWith(Constants.R_TAGS);
|
||||
}
|
||||
|
||||
private static boolean isHead(final Ref ref) {
|
||||
return ref.getName().startsWith(Constants.R_HEADS);
|
||||
}
|
||||
|
@ -224,8 +224,7 @@ public class VisibleRefFilter implements RefFilter {
|
||||
// Traverse the history until the tag is found.
|
||||
//
|
||||
rw.markUninteresting(tagged);
|
||||
RevCommit c;
|
||||
while ((c = rw.next()) != null) {
|
||||
while (rw.next() != null) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,17 +38,14 @@ public class MergedSender extends ReplyToChangeSender {
|
||||
}
|
||||
|
||||
private final ApprovalTypes approvalTypes;
|
||||
private Branch.NameKey dest;
|
||||
|
||||
@Inject
|
||||
public MergedSender(EmailArguments ea, ApprovalTypes at, @Assisted Change c) {
|
||||
super(ea, c, "merged");
|
||||
dest = c.getDest();
|
||||
approvalTypes = at;
|
||||
}
|
||||
|
||||
public void setDest(final Branch.NameKey key) {
|
||||
dest = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -237,7 +237,6 @@ public abstract class QueryRewriter<T> {
|
||||
}
|
||||
}
|
||||
|
||||
final int cnt = pattern.getChildCount();
|
||||
if ((isAND(pattern) && isAND(actual)) //
|
||||
|| (isOR(pattern) && isOR(actual)) //
|
||||
|| (isNOT(pattern) && isNOT(actual)) //
|
||||
|
@ -75,8 +75,6 @@ public final class SuExec extends BaseCommand {
|
||||
public void start(Environment env) throws IOException {
|
||||
try {
|
||||
if (caller.get() instanceof PeerDaemonUser) {
|
||||
final PeerDaemonUser peer = (PeerDaemonUser) caller.get();
|
||||
|
||||
parseCommandLine();
|
||||
|
||||
final Context ctx = callingContext.subContext(newSession(), join(args));
|
||||
|
Loading…
x
Reference in New Issue
Block a user