Null pointer exception on .iterator() call
Posted
by Peter
on Stack Overflow
See other posts from Stack Overflow
or by Peter
Published on 2010-03-14T22:27:25Z
Indexed on
2010/03/14
22:35 UTC
Read the original article
Hit count: 174
java
I'm getting a strange NullPointerException, evidently thrown by the following line of code:
Iterator<Note> it = notes.iterator();
I've checked, and at the time the java.util.TreeSet notes
is always non-null (with 15 elements). The TreeSet API says nothing about iterator()
throwing NullPointerExceptions. What else could be going here?
© Stack Overflow or respective owner