Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ subprojects {

compileOnly("org.jspecify:jspecify:1.0.0")
testCompileOnly("org.jspecify:jspecify:1.0.0")
def eisop_version = "3.49.1-eisop1"
def eisop_version = "3.49.3-eisop1"
compileOnly "io.github.eisop:checker-qual:$eisop_version"
compileOnly "io.github.eisop:checker-util:$eisop_version"
testCompileOnly "io.github.eisop:checker-qual:$eisop_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ public String toString() {

@Override
public Iterator<S> iterator() {
return new ArrayIterator<>(this);
return new ArrayIterator<S>(this);
}

private static class ArrayIterator<T> implements Iterator<T> {
private static class ArrayIterator<T extends @Nullable Object> implements Iterator<T> {

private int i = 0;
private final ImmutableArray<T> coll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ private Immutables() {
*
* @return the view onto the iterable as an immutable list
*/
public static <T> ImmutableList<T> createListFrom(Iterable<? extends T> iterable) {
public static <T extends @Nullable Object> ImmutableList<T> createListFrom(
Iterable<? extends T> iterable) {
ImmutableList<T> result = ImmutableSLList.nil();
for (T t : iterable) {
result = result.prepend(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,20 @@ public void testEqualityEmpty() {

@Test
public void testIntersectEmpty() {
ImmutableSet<Object> s0 = DefaultImmutableSet.nil();
ImmutableSet<Object> s1 = DefaultImmutableSet.nil().add("1");
ImmutableSet<Object> s2 = DefaultImmutableSet.nil().add("2");
var s0 = DefaultImmutableSet.nil();
var s1 = DefaultImmutableSet.nil().add("1");
var s2 = DefaultImmutableSet.nil().add("2");

ImmutableSet<Object> sIntersect = s1.intersect(s2);
var sIntersect = s1.intersect(s2);
assertEquals(0, sIntersect.size());
assertEquals(s0, sIntersect);
}

@Test
public void testHashCodes() {

ImmutableSet<Object> s1 = DefaultImmutableSet.nil().add("one").add("two");
ImmutableSet<Object> s2 = DefaultImmutableSet.nil().add("two").add("one");
var s1 = DefaultImmutableSet.nil().add("one").add("two");
var s2 = DefaultImmutableSet.nil().add("two").add("one");

assertEquals(s1, s2);
int hash1 = s1.hashCode();
Expand Down
Loading