Project

Profile

Help

Revision 89a50aef

Added by Norman Tovey-Walsh over 1 year ago

Fix for bug #4750 in 10

View differences:

latest10/hej/net/sf/saxon/s9api/XdmSequenceIterator.java
29 29
 * wishing to control error handling should take care to catch this exception.</p>
30 30
 */
31 31
public class XdmSequenceIterator<T extends XdmItem> implements Iterator<T> {
32

  
33
    /*@Nullable*/ private T next = null;
34
    private int state;
35
    private SequenceIterator base;
36

  
37 32
    private final static int BEFORE_ITEM = 0;
38 33
    private final static int ON_ITEM = 1;
39 34
    private final static int FINISHED = 2;
40 35

  
36
    /*@Nullable*/ private T next = null;
37
    private int state = BEFORE_ITEM;
38
    private SequenceIterator base;
39

  
41 40
    protected XdmSequenceIterator(SequenceIterator base) {
42 41
        this.base = base;
43 42
        this.state = BEFORE_ITEM;
......
114 113
                throw new java.util.NoSuchElementException();
115 114
            case BEFORE_ITEM:
116 115
                if (hasNext()) {
116
                    state = BEFORE_ITEM;
117 117
                    return next;
118 118
                } else {
119 119
                    throw new java.util.NoSuchElementException();

Also available in: Unified diff