GP-0 corrected empty AddressIterator regression

This commit is contained in:
ghidra1 2021-07-07 14:30:20 -04:00
parent a80f046161
commit 6a6bbf1b9c

View file

@ -16,7 +16,6 @@
package ghidra.program.model.address;
import java.util.Iterator;
import java.util.NoSuchElementException;
import util.CollectionUtils;
@ -41,7 +40,7 @@ public interface AddressIterator extends Iterator<Address>, Iterable<Address> {
@Override
public Address next() {
throw new NoSuchElementException();
return null;
}
@Override
@ -51,4 +50,21 @@ public interface AddressIterator extends Iterator<Address>, Iterable<Address> {
};
/**
* Get the next address.
* <P>NOTE: This deviates from the standard {@link Iterator} interface
* by returning null instead of throwing an exception.
* @return the next address in the iteration.
*/
@Override
public Address next();
/**
* Checks if there is a next address in the iteration.
*
* @return true if there is a next address.
*/
@Override
public boolean hasNext();
}