]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix annotations to match super methods
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 25 Mar 2019 20:07:34 +0000 (22:07 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 25 Mar 2019 20:07:34 +0000 (22:07 +0200)
app/src/main/java/net/ktnx/mobileledger/utils/ObservableList.java

index eac023767186d668583be3c7bcd9328547d4a9e4..3add1bd488ce940c5f77a6db3a41306f64b254b2 100644 (file)
@@ -20,6 +20,8 @@ package net.ktnx.mobileledger.utils;
 import android.os.Build;
 import android.util.Log;
 
+import org.jetbrains.annotations.NotNull;
+
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.Iterator;
@@ -203,21 +205,25 @@ public class ObservableList<T> extends Observable implements List<T> {
             return list.lastIndexOf(o);
         }
     }
+    @NotNull
     public ListIterator<T> listIterator() {
         if (!lock.isWriteLockedByCurrentThread()) throw new RuntimeException(
                 "Iterators break encapsulation and ignore locking. Write-lock first");
         return list.listIterator();
     }
+    @NotNull
     public ListIterator<T> listIterator(int index) {
         if (!lock.isWriteLockedByCurrentThread()) throw new RuntimeException(
                 "Iterators break encapsulation and ignore locking. Write-lock first");
         return list.listIterator(index);
     }
+    @NotNull
     public List<T> subList(int fromIndex, int toIndex) {
         try (LockHolder lh = lockForReading()) {
             return list.subList(fromIndex, toIndex);
         }
     }
+    @NotNull
     @RequiresApi(api = Build.VERSION_CODES.N)
     public Spliterator<T> spliterator() {
         if (!lock.isWriteLockedByCurrentThread()) throw new RuntimeException(