Remove unwanted @Nonnull annotations from VariableSizeList and iterator

This commit is contained in:
Ben Gruver 2012-12-31 00:13:01 -08:00
parent 7301fbe30e
commit 8c74001967
2 changed files with 4 additions and 4 deletions

View File

@ -48,19 +48,20 @@ public abstract class VariableSizeList<T> extends AbstractSequentialList<T> {
this.size = size; this.size = size;
} }
@Nonnull protected abstract T readNextItem(@Nonnull DexReader reader, int index); protected abstract T readNextItem(@Nonnull DexReader reader, int index);
@Override @Override
@Nonnull
public VariableSizeListIterator<T> listIterator() { public VariableSizeListIterator<T> listIterator() {
return listIterator(0); return listIterator(0);
} }
@Override public int size() { return size; } @Override public int size() { return size; }
@Nonnull
@Override @Override
public VariableSizeListIterator<T> listIterator(int index) { public VariableSizeListIterator<T> listIterator(int index) {
VariableSizeListIterator<T> iterator = new VariableSizeListIterator<T>(dexBuf, offset, size) { VariableSizeListIterator<T> iterator = new VariableSizeListIterator<T>(dexBuf, offset, size) {
@Nonnull
@Override @Override
protected T readNextItem(@Nonnull DexReader reader, int index) { protected T readNextItem(@Nonnull DexReader reader, int index) {
return VariableSizeList.this.readNextItem(reader, index); return VariableSizeList.this.readNextItem(reader, index);

View File

@ -58,7 +58,7 @@ public abstract class VariableSizeListIterator<T> implements ListIterator<T> {
* @param index The index of the item being read. This is guaranteed to be less than {@code size} * @param index The index of the item being read. This is guaranteed to be less than {@code size}
* @return The item that was read * @return The item that was read
*/ */
@Nonnull protected abstract T readNextItem(@Nonnull DexReader reader, int index); protected abstract T readNextItem(@Nonnull DexReader reader, int index);
public int getReaderOffset() { public int getReaderOffset() {
return reader.getOffset(); return reader.getOffset();
@ -70,7 +70,6 @@ public abstract class VariableSizeListIterator<T> implements ListIterator<T> {
} }
@Override @Override
@Nonnull
public T next() { public T next() {
if (index >= size) { if (index >= size) {
throw new NoSuchElementException(); throw new NoSuchElementException();