18 |
|
return new TestSuite(ThreadLocalTest.class); |
19 |
|
} |
20 |
|
|
21 |
< |
static ThreadLocal<Integer> tl = new ThreadLocal<Integer>() { |
22 |
< |
public Integer initialValue() { |
21 |
> |
static ThreadLocal<Item> tl = new ThreadLocal<Item>() { |
22 |
> |
public Item initialValue() { |
23 |
|
return one; |
24 |
|
} |
25 |
|
}; |
26 |
|
|
27 |
< |
static InheritableThreadLocal<Integer> itl = |
28 |
< |
new InheritableThreadLocal<Integer>() { |
29 |
< |
protected Integer initialValue() { |
27 |
> |
static InheritableThreadLocal<Item> itl = |
28 |
> |
new InheritableThreadLocal<Item>() { |
29 |
> |
protected Item initialValue() { |
30 |
|
return zero; |
31 |
|
} |
32 |
|
|
33 |
< |
protected Integer childValue(Integer parentValue) { |
34 |
< |
return new Integer(parentValue.intValue() + 1); |
33 |
> |
protected Item childValue(Item parentValue) { |
34 |
> |
return new Item(parentValue.intValue() + 1); |
35 |
|
} |
36 |
|
}; |
37 |
|
|