1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
import java.util.TreeSet;
// @skip-test Crashes the Checker Framework, but skipped to avoid breaking the build
//
// It looks like we are relying on name equality at some point when resolving
// a type parameter. If you replace T by E, changing the code to:
// static class PollableTreeSet<E> extends TreeSet<E> {
// }
// then the assertion failure goes away. Evidently this is because
// the annotated TreeSet.java file uses the type variable E.
public class SortingCollection<T> {
class MergingIterator {
private final PollableTreeSet<String> queue = null;
public boolean hasNext() {
return !queue.isEmpty();
}
}
static class PollableTreeSet<T> extends TreeSet<T> {}
}
|