// Test case for Issue 312: // https://github.com/typetools/checker-framework/issues/312 import java.util.List; // A mock-up of the Guava API used in the test case; // see below for the code that uses Guava. @SuppressWarnings("nullness") class Ordering312 { public static Ordering312 natural() { return null; } public Ordering312 reverse() { return null; } public List sortedCopy(Iterable elements) { return null; } } class Issue312 { void test(List list) { Ordering312.natural().reverse().sortedCopy(list); } } /* Original test using Guava: import com.google.common.collect.Lists; import com.google.common.collect.Ordering312; import java.util.List; class Issue312 { void test() { List list = Lists.newArrayList(); Ordering.natural().reverse().sortedCopy(list); } } */