Ghidra is a software reverse engineering (SRE) framework
GP-0 corrected empty AddressIterator regression
ghidra16a6bbf1b9cf0
diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressIterator.javaindex 8755135097..f389c84166 100644--- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressIterator.java+++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressIterator.java@@ -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> {@Overridepublic 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();+}