-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Please see PR #16 in which I replaced the implementation of the input stream with something from the default Java API. I don't see why the home-made implementation is better, but it has a surprising effect, which is the reason I've raised this PR.
Why does the original version of the unit test work? The first scanner should, on nextLine
, fast forward through the text to cache some of the line after? In the original code it doesn't, meaning that the test is able to pass. However, I think the test should not pass (it doesn't with this refactor) and the replacement test is more correct.
I also changed the README where I found it slightly hard to understand why you were asserting the second line, but it seemed simpler when we assert both first and second line.
This may or may not seem like an improvement. Just sharing.