Merged bug fix from Stable into Unstable

This commit is contained in:
David Roazen 2011-07-01 16:20:25 -04:00
commit b19e22aed9
2 changed files with 4 additions and 9 deletions

View File

@ -68,13 +68,13 @@ public class CachingIndexedFastaSequenceFile extends IndexedFastaSequenceFile {
ReferenceSequence seq = null;
}
private static ThreadLocal<Cache> cache;
private ThreadLocal<Cache> cache;
static {
{
resetThreadLocalCache();
};
}
protected static void resetThreadLocalCache() {
protected void resetThreadLocalCache() {
cache = new ThreadLocal<Cache> () {
@Override protected Cache initialValue() {
return new Cache();

View File

@ -34,11 +34,6 @@ public class CachingIndexedFastaSequenceFileUnitTest extends BaseTest {
private static final List<Integer> QUERY_SIZES = Arrays.asList(1, 10, 100, 1000);
private static final List<Integer> CACHE_SIZES = Arrays.asList(-1, 10, 1000);
@BeforeMethod
public void clearCache() {
CachingIndexedFastaSequenceFile.resetThreadLocalCache();
}
@DataProvider(name = "fastas")
public Object[][] createData1() {
List<Object[]> params = new ArrayList<Object[]>();