File tree 2 files changed +8
-4
lines changed
android/guava-tests/test/com/google/common/collect
guava-tests/test/com/google/common/collect
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 42
42
import java .util .Random ;
43
43
import java .util .RandomAccess ;
44
44
import junit .framework .TestCase ;
45
+ import org .checkerframework .checker .nullness .qual .NonNull ;
45
46
import org .checkerframework .checker .nullness .qual .Nullable ;
46
47
47
48
/**
@@ -916,7 +917,7 @@ private static <T> void testExhaustively(
916
917
917
918
// shoot me, but I didn't want to deal with wildcards through the whole test
918
919
@ SuppressWarnings ("unchecked" )
919
- Scenario <T > starter = new Scenario <>((Ordering ) ordering , list , emptyArray );
920
+ Scenario <T > starter = new Scenario <>((Ordering < T > ) ordering , list , emptyArray );
920
921
verifyScenario (starter , 0 );
921
922
}
922
923
@@ -1000,7 +1001,8 @@ void testSortedCopy() {
1000
1001
assertEquals (strictlyOrderedList , ordering .sortedCopy (shuffledList ));
1001
1002
1002
1003
if (!strictlyOrderedList .contains (null )) {
1003
- assertEquals (strictlyOrderedList , ordering .immutableSortedCopy (shuffledList ));
1004
+ List <@ NonNull T > nonNullShuffledList = (List <@ NonNull T >) shuffledList ;
1005
+ assertEquals (strictlyOrderedList , ordering .immutableSortedCopy (nonNullShuffledList ));
1004
1006
}
1005
1007
}
1006
1008
}
Original file line number Diff line number Diff line change 42
42
import java .util .Random ;
43
43
import java .util .RandomAccess ;
44
44
import junit .framework .TestCase ;
45
+ import org .checkerframework .checker .nullness .qual .NonNull ;
45
46
import org .checkerframework .checker .nullness .qual .Nullable ;
46
47
47
48
/**
@@ -916,7 +917,7 @@ private static <T> void testExhaustively(
916
917
917
918
// shoot me, but I didn't want to deal with wildcards through the whole test
918
919
@ SuppressWarnings ("unchecked" )
919
- Scenario <T > starter = new Scenario <>((Ordering ) ordering , list , emptyArray );
920
+ Scenario <T > starter = new Scenario <>((Ordering < T > ) ordering , list , emptyArray );
920
921
verifyScenario (starter , 0 );
921
922
}
922
923
@@ -1000,7 +1001,8 @@ void testSortedCopy() {
1000
1001
assertEquals (strictlyOrderedList , ordering .sortedCopy (shuffledList ));
1001
1002
1002
1003
if (!strictlyOrderedList .contains (null )) {
1003
- assertEquals (strictlyOrderedList , ordering .immutableSortedCopy (shuffledList ));
1004
+ List <@ NonNull T > nonNullShuffledList = (List <@ NonNull T >) shuffledList ;
1005
+ assertEquals (strictlyOrderedList , ordering .immutableSortedCopy (nonNullShuffledList ));
1004
1006
}
1005
1007
}
1006
1008
}
You can’t perform that action at this time.
0 commit comments