Community
Participate
Working Groups
I20040907 Using IScanner#setSource(...), the line ends are not reset. Thus if a different source is passed in, IScanner#gerLineEnds() will not return the right line ends.
This is trivial to fix. For the internal scanner, the reset should also be done in the scanner and not in the parser.
Created attachment 14531 [details] Proposed patch
Created attachment 14532 [details] Regression test
- Changed setSource(char[]) to reset the lineEndPtr. - Added helper method on Scanner (and PublicScanner): setSource(CompilationResult). - Changed all calls that used to set the source from a compilation result to use this helper. - Added regression test InternalScannerTest#test002()
Verified for 3.1 M2 with build I200409230010.