Remove unnecessary local variables

Change-Id: I20ee3f7258d7e98b9c57b49c21b1e2d1582f626f
This commit is contained in:
alex.ryazantsev
2013-11-20 01:45:58 +04:00
committed by Shawn Pearce
parent 23e1a2e824
commit bbf93f85cf
12 changed files with 29 additions and 50 deletions

View File

@@ -299,9 +299,7 @@ public class FromAddressGeneratorProviderTest {
final Account account = new Account(userId, TimeUtil.nowTs());
account.setFullName(name);
account.setPreferredEmail(email);
final AccountState s =
new AccountState(account, Collections.<AccountGroup.UUID> emptySet(),
Collections.<AccountExternalId> emptySet());
return s;
return new AccountState(account, Collections.<AccountGroup.UUID> emptySet(),
Collections.<AccountExternalId> emptySet());
}
}

View File

@@ -57,8 +57,7 @@ public class InMemoryDatabase implements SchemaFactory<ReviewDb> {
final Properties p = new Properties();
p.setProperty("driver", org.h2.Driver.class.getName());
p.setProperty("url", "jdbc:h2:mem:" + "Test_" + (++dbCnt));
final DataSource dataSource = new SimpleDataSource(p);
return dataSource;
return new SimpleDataSource(p);
}
/** Drop the database from memory; does nothing if the instance was null. */