Fix unused and deprecation warnings

Despite our best efforts to resolve warnings, some new ones slipped in
late this afternoon.

Change-Id: I4b8f8bba08de2d5c7a2a03c04d121c0e447bfa8e
Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java
index 2a2fec3..a028619 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java
@@ -290,8 +290,6 @@
     private static final int C_SIDEBYSIDE = 5;
     private int activeRow = -1;
 
-    private PatchSet.Id patchSetIdToCompareWith;
-
     MyTable() {
       keysNavigation.add(new PrevKeyCommand(0, 'k', Util.C.patchTablePrev()));
       keysNavigation.add(new NextKeyCommand(0, 'j', Util.C.patchTableNext()));
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java
index 342d390..0cdfcc8 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java
@@ -112,9 +112,6 @@
         }
       };
 
-  // The change id for which the above patch set id's are valid
-  private static Change.Id currentChangeId = null;
-
   protected final Patch.Key patchKey;
   protected PatchSetDetail patchSetDetail;
   protected PatchTable fileList;
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetDetailFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetDetailFactory.java
index d7c5fc7..6865b2b 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetDetailFactory.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetDetailFactory.java
@@ -19,16 +19,15 @@
 import com.google.gerrit.httpd.rpc.Handler;
 import com.google.gerrit.reviewdb.Account;
 import com.google.gerrit.reviewdb.AccountDiffPreference;
+import com.google.gerrit.reviewdb.AccountDiffPreference.Whitespace;
 import com.google.gerrit.reviewdb.AccountPatchReview;
 import com.google.gerrit.reviewdb.Patch;
 import com.google.gerrit.reviewdb.PatchLineComment;
 import com.google.gerrit.reviewdb.PatchSet;
 import com.google.gerrit.reviewdb.Project;
 import com.google.gerrit.reviewdb.ReviewDb;
-import com.google.gerrit.reviewdb.AccountDiffPreference.Whitespace;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.IdentifiedUser;
-import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.patch.PatchList;
 import com.google.gerrit.server.patch.PatchListCache;
 import com.google.gerrit.server.patch.PatchListKey;
@@ -40,9 +39,7 @@
 import com.google.inject.Inject;
 import com.google.inject.assistedinject.Assisted;
 
-import org.eclipse.jgit.errors.RepositoryNotFoundException;
 import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.Repository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,8 +60,6 @@
         @Assisted("psIdOld") PatchSet.Id psIdB, AccountDiffPreference diffPrefs);
   }
 
-  private final GitRepositoryManager repoManager;
-
   private final PatchSetInfoFactory infoFactory;
   private final ReviewDb db;
   private final PatchListCache patchListCache;
@@ -82,14 +77,12 @@
   PatchSet patchSet;
 
   @Inject
-  PatchSetDetailFactory(final GitRepositoryManager grm,
-      final PatchSetInfoFactory psif, final ReviewDb db,
+  PatchSetDetailFactory(final PatchSetInfoFactory psif, final ReviewDb db,
       final PatchListCache patchListCache,
       final ChangeControl.Factory changeControlFactory,
       @Assisted("psIdNew") final PatchSet.Id psIdNew,
       @Assisted("psIdOld") @Nullable final PatchSet.Id psIdOld,
       @Assisted @Nullable final AccountDiffPreference diffPrefs) {
-    this.repoManager = grm;
     this.infoFactory = psif;
     this.db = db;
     this.patchListCache = patchListCache;
@@ -100,7 +93,6 @@
     this.diffPrefs = diffPrefs;
   }
 
-  @SuppressWarnings("deprecation")
   @Override
   public PatchSetDetail call() throws OrmException, NoSuchEntityException,
       PatchSetInfoNotAvailableException, NoSuchChangeException {