Преглед на файлове

ObjectIdSubclassMap: Correct Iterator to throw NoSuchElementException

The Iterator contract says next() shall throw NoSuchElementException
if there are no more items remaining in the iteration.  We got this
wrong when I originally wrote the implementation, so fix it.

Change-Id: Iea25e6569ead5c8b3128b8a368c5b2caebec7ecc
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
tags/v0.8.1
Shawn O. Pearce преди 14 години
родител
ревизия
466bec3cc9
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2
    1
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java

+ 2
- 1
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java Целия файл

package org.eclipse.jgit.lib; package org.eclipse.jgit.lib;


import java.util.Iterator; import java.util.Iterator;
import java.util.NoSuchElementException;


/** /**
* Fast, efficient map specifically for {@link ObjectId} subclasses. * Fast, efficient map specifically for {@link ObjectId} subclasses.
return v; return v;
} }
} }
throw new IllegalStateException();
throw new NoSuchElementException();
} }


public void remove() { public void remove() {

Loading…
Отказ
Запис