Null pointer exception on .iterator() call
- by Peter
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?