Skip to content

Commit

Permalink
Remove NonNullElementWrapperList overrides not available yet in Android
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Sep 23, 2024
1 parent feb2ee1 commit dd92ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.RandomAccess;
import java.util.Spliterator;

/**
* {@link List} which wraps another {@code List} but prevents insertion of {@code null} elements.
Expand Down Expand Up @@ -109,16 +107,6 @@ public int lastIndexOf(Object o) {
return delegate.lastIndexOf(o);
}

@Override
public Spliterator<E> spliterator() {
return delegate.spliterator();
}

@Override
public void sort(Comparator<? super E> c) {
delegate.sort(c);
}

@Override
public Object[] toArray() {
return delegate.toArray();
Expand All @@ -138,4 +126,7 @@ public boolean equals(Object o) {
public int hashCode() {
return delegate.hashCode();
}

// Maybe also delegate List#sort and List#spliterator in the future, but that
// requires Android API level 24
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public static String constructorToString(Constructor<?> constructor) {
return stringBuilder.toString();
}

// Ideally parameter type would be java.lang.reflect.Executable, but that was added in Android API
// level 26
// Ideally parameter type would be java.lang.reflect.Executable, but that was added
// in Android API level 26
private static void appendExecutableParameters(
AccessibleObject executable, StringBuilder stringBuilder) {
stringBuilder.append('(');
Expand Down

0 comments on commit dd92ea3

Please sign in to comment.