Merged bug fix from Stable into Unstable
This commit is contained in:
commit
b19e22aed9
|
|
@ -68,13 +68,13 @@ public class CachingIndexedFastaSequenceFile extends IndexedFastaSequenceFile {
|
||||||
ReferenceSequence seq = null;
|
ReferenceSequence seq = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ThreadLocal<Cache> cache;
|
private ThreadLocal<Cache> cache;
|
||||||
|
|
||||||
static {
|
{
|
||||||
resetThreadLocalCache();
|
resetThreadLocalCache();
|
||||||
};
|
}
|
||||||
|
|
||||||
protected static void resetThreadLocalCache() {
|
protected void resetThreadLocalCache() {
|
||||||
cache = new ThreadLocal<Cache> () {
|
cache = new ThreadLocal<Cache> () {
|
||||||
@Override protected Cache initialValue() {
|
@Override protected Cache initialValue() {
|
||||||
return new Cache();
|
return new Cache();
|
||||||
|
|
|
||||||
|
|
@ -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> QUERY_SIZES = Arrays.asList(1, 10, 100, 1000);
|
||||||
private static final List<Integer> CACHE_SIZES = Arrays.asList(-1, 10, 1000);
|
private static final List<Integer> CACHE_SIZES = Arrays.asList(-1, 10, 1000);
|
||||||
|
|
||||||
@BeforeMethod
|
|
||||||
public void clearCache() {
|
|
||||||
CachingIndexedFastaSequenceFile.resetThreadLocalCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
@DataProvider(name = "fastas")
|
@DataProvider(name = "fastas")
|
||||||
public Object[][] createData1() {
|
public Object[][] createData1() {
|
||||||
List<Object[]> params = new ArrayList<Object[]>();
|
List<Object[]> params = new ArrayList<Object[]>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue