DO NOT REPLY [Bug 13522] New: - beginOffset() returns invalid values

[email protected]
Newsgroups gmane.comp.jakarta.oro.devel
Message-ID <[email protected]>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13522

beginOffset() returns invalid values

           Summary: beginOffset() returns invalid values
           Product: ORO
           Version: 2.0.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Main
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The following code:

   AwkStreamInput input = new AwkStreamInput(new FileReader(genomeFile));
   org.apache.oro.text.regex.Pattern p = new AwkCompiler().compile
(anchorPatternStr);
   AwkMatcher matcher = new AwkMatcher();

   while( matcher.contains(input, p))
        System.err.println("found at " + matcher.getMatch().beginOffset(0));

Produces this output:

found at 110
found at 460
found at 931
found at 1027
found at 413
found at 1657
found at 1756
found at 1946
found at 0
found at 55
found at 529
found at 816
found at 1965

offset values are clearly wrong, as they are supposed to be increasing.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.