Clean up various warnings

This patch removes the obsolete imports and updates some of the
deprecated API.

Change-Id: I2c077e786b6acbb0fcbfae053a538757224281a8
This commit is contained in:
Deniz Türkoglu
2012-05-09 14:56:34 -07:00
parent cb0ca18ab1
commit d897d3d633
10 changed files with 6 additions and 13 deletions

View File

@@ -94,6 +94,7 @@ public class EhcachePoolImpl implements CachePool {
this.caches = new HashMap<String, CacheProvider<?, ?>>();
}
@SuppressWarnings({"rawtypes", "unchecked"})
private void start() {
synchronized (lock) {
if (manager != null) {

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.client.account;
import com.google.gerrit.client.FormatUtil;
import com.google.gerrit.client.Gerrit;
import com.google.gerrit.client.rpc.ScreenLoadCallback;
import com.google.gerrit.client.ui.FancyFlexTable;
@@ -24,8 +23,6 @@ import com.google.gerrit.common.data.AgreementInfo;
import com.google.gerrit.common.data.ContributorAgreement;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
import com.google.gwtexpui.safehtml.client.SafeHtml;
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
public class MyAgreementsScreen extends SettingsScreen {
private AgreementTable agreements;

View File

@@ -76,7 +76,7 @@ public class EditDeserializer implements JsonDeserializer<Edit>,
public JsonElement serialize(final Edit src, final Type typeOfSrc,
final JsonSerializationContext context) {
if (src == null) {
return new JsonNull();
return JsonNull.INSTANCE;
}
final JsonArray a = new JsonArray();
add(a, src);

View File

@@ -30,7 +30,6 @@ import com.google.gerrit.server.account.AccountCache;
import com.google.gerrit.server.account.AccountState;
import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.SitePath;
import com.google.gerrit.server.config.SitePaths;
import com.google.gerrit.server.events.ApprovalAttribute;
import com.google.gerrit.server.events.ChangeAbandonedEvent;

View File

@@ -27,7 +27,6 @@ import com.google.gerrit.reviewdb.client.PatchSetApproval;
import com.google.gerrit.reviewdb.client.PatchSetInfo;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gwtorm.server.OrmException;
import com.google.gwtorm.server.ResultSet;
import com.google.inject.Inject;
import java.io.IOException;

View File

@@ -40,6 +40,8 @@ public interface EmailTokenVerifier {
/** Exception thrown when a token does not parse correctly. */
public static class InvalidTokenException extends Exception {
private static final long serialVersionUID = 1L;
public InvalidTokenException() {
super("Invalid token");
}

View File

@@ -27,7 +27,6 @@ import com.googlecode.prolog_cafe.lang.SymbolTerm;
import com.googlecode.prolog_cafe.lang.Term;
abstract class AbstractCommitUserIdentityPredicate extends Predicate.P3 {
private static final long serialVersionUID = 1L;
private static final SymbolTerm user = SymbolTerm.intern("user", 1);
private static final SymbolTerm anonymous = SymbolTerm.intern("anonymous");

View File

@@ -73,6 +73,7 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
private GitRepositoryManager repoManager;
private ReplicationQueue replication;
@SuppressWarnings("unchecked")
@Override
@Before
public void setUp() throws Exception {

View File

@@ -29,13 +29,11 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.rules.PrologEnvironment;
import com.google.gerrit.rules.RulesCache;
import com.google.gerrit.server.AccessPath;
import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.account.CapabilityControl;
import com.google.gerrit.server.account.GroupCache;
import com.google.gerrit.server.account.GroupMembership;
import com.google.gerrit.server.account.ListGroupMembership;
import com.google.gerrit.server.cache.ConcurrentHashMapCache;
@@ -44,7 +42,6 @@ import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.gerrit.server.git.ProjectConfig;
import com.google.gwtorm.server.SchemaFactory;
import com.google.inject.Guice;
import com.google.inject.Injector;
@@ -375,8 +372,6 @@ public class RefControlTest extends TestCase {
}
private ProjectControl user(String name, AccountGroup.UUID... memberOf) {
SchemaFactory<ReviewDb> schema = null;
GroupCache groupCache = null;
String canonicalWebUrl = "http://localhost";
return new ProjectControl(Collections.<AccountGroup.UUID> emptySet(),

View File

@@ -224,7 +224,7 @@ public class SubmoduleSectionParserTest extends LocalDiskRepositoryTestCase {
break;
} else {
expect(repoManager.list()).andReturn(
new TreeSet<Project.NameKey>(Collections.EMPTY_LIST));
new TreeSet<Project.NameKey>(Collections.<Project.NameKey> emptyList()));
}
}
}