reset() then exception
Brought to you by:
derrickoswald
I'm not really sure if this is expected behaivor or not.
The following code throws IllegalArgumentException "attempt to extract future characters from source"
Parser parse = new Parser(filename);
NodeList list = parse.extractAllNodesThatMatch(filter);
parse.reset();
System.out.println(list.elementAt(0).toHtml(true));
Assuming the Tag at 0 has attributes. Upon investigation it seems that when attributes are checked it checks the offset and since reset makes the offset = 0 the exception is thrown.
However this doesn't happen if the tag doesn't have attributes it throws no errors. I would figure it should be one or the other.