| 1 |
import java.io.Serializable; |
| 2 |
import java.util.AbstractMap; |
| 3 |
import java.util.concurrent.ConcurrentMap; |
| 4 |
import java.util.concurrent.locks.ReentrantLock; |
| 5 |
|
| 6 |
@SuppressWarnings("") // Just check for crashes. |
| 7 |
public class Bug2 { |
| 8 |
|
| 9 |
public <C, D> ConcurrentMap<C, D> makeMap() { |
| 10 |
return Bug2.create(this); |
| 11 |
} |
| 12 |
|
| 13 |
static <A, B> MyMap<A, B, ? extends MyMap.MyEntry<A, B, ?>, ?> create(Bug2 builder) { |
| 14 |
throw new RuntimeException(); |
| 15 |
} |
| 16 |
|
| 17 |
abstract static class MyMap< |
| 18 |
E, F, G extends MyMap.MyEntry<E, F, G>, H extends MyMap.MyLock<E, F, G, H>> |
| 19 |
extends AbstractMap<E, F> implements ConcurrentMap<E, F>, Serializable { |
| 20 |
|
| 21 |
interface MyEntry<I, J, K extends MyEntry<I, J, K>> {} |
| 22 |
|
| 23 |
abstract static class MyLock<L, M, N extends MyEntry<L, M, N>, O extends MyLock<L, M, N, O>> |
| 24 |
extends ReentrantLock {} |
| 25 |
} |
| 26 |
} |