mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-0 Add check for empty AddressSet and return empty result iterator.
Revised various javadocs to clarify use of null address set argument.
This commit is contained in:
parent
bfedb12eb2
commit
c708d6a826
20 changed files with 169 additions and 65 deletions
|
@ -115,7 +115,7 @@ public class AddressKeyIteratorTest extends AbstractGhidraHeadedIntegrationTest
|
|||
|
||||
@Test
|
||||
public void testIterator0() throws Exception {
|
||||
AddressKeyIterator it = new AddressKeyIterator();
|
||||
AddressKeyIterator it = AddressKeyIterator.EMPTY_ITERATOR;
|
||||
assertTrue(!it.hasNext());
|
||||
assertTrue(!it.hasPrevious());
|
||||
try {
|
||||
|
@ -123,12 +123,14 @@ public class AddressKeyIteratorTest extends AbstractGhidraHeadedIntegrationTest
|
|||
Assert.fail();
|
||||
}
|
||||
catch (NoSuchElementException e) {
|
||||
// expected
|
||||
}
|
||||
try {
|
||||
it.previous();
|
||||
Assert.fail();
|
||||
}
|
||||
catch (NoSuchElementException e) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue