code: @Override
    public int endPosition() {
      if (assumeSinglePosition) {
        return super.endPosition();
      } else {
        int status = super.endPosition();
        if (status >= 0) {
          try {
            processEncodedPayload();
            return (status != NO_MORE_POSITIONS) ? (mtasPosition.getEnd() + 1)
                : NO_MORE_POSITIONS;
          } catch (IOException e) {
            log.debug(e);
            return NO_MORE_POSITIONS;
          }
        } else {
          return status;
        }
      }
    }
docs: /*
  (non-Javadoc)
  
  @see org.apache.lucene.search.spans.TermSpans#endPosition()