ObjectDirectoryTest: Fix warnings about variable hiding
The variable and parameter named 'db' were hiding class members with the same name. Change-Id: I27017afdc5f49c38c6f5be494e7a21239ea601a7 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
This commit is contained in:
parent
101ac16e8d
commit
35ba741cd4
|
@ -62,18 +62,18 @@ public void testConcurrentInsertionOfBlobsToTheSameNewFanOutDirectory()
|
|||
throws Exception {
|
||||
ExecutorService e = Executors.newCachedThreadPool();
|
||||
for (int i=0; i < 100; ++i) {
|
||||
ObjectDirectory db = createBareRepository().getObjectDatabase();
|
||||
for (Future f : e.invokeAll(blobInsertersForTheSameFanOutDir(db))) {
|
||||
ObjectDirectory dir = createBareRepository().getObjectDatabase();
|
||||
for (Future f : e.invokeAll(blobInsertersForTheSameFanOutDir(dir))) {
|
||||
f.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Collection<Callable<ObjectId>> blobInsertersForTheSameFanOutDir(
|
||||
final ObjectDirectory db) {
|
||||
final ObjectDirectory dir) {
|
||||
Callable<ObjectId> callable = new Callable<ObjectId>() {
|
||||
public ObjectId call() throws Exception {
|
||||
return db.newInserter().insert(Constants.OBJ_BLOB, new byte[0]);
|
||||
return dir.newInserter().insert(Constants.OBJ_BLOB, new byte[0]);
|
||||
}
|
||||
};
|
||||
return Collections.nCopies(4, callable);
|
||||
|
|
Loading…
Reference in New Issue