-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle two continuous START TEXT TAG by throwing Error #96
Conversation
* HandBuiltParser is also not giving error when two START_TEXT are encountered one after the other without the END_TEXT. * It ignores the second START_TEXT and take the END_TEXT for the first START_TEXT Signed-off-by: rtgdk <rohit.lodhartg@gmail.com>
This PR will be for identifying the line no. of the error tag/value document. |
From this, we can get the correct line and character position where the START_TEXT is starting which can be passed in the error itself. I'll commit that code soon. |
If we break the loop, we will get an exception unterminated text block. I think it may be better to just throw an exception with a message " found within a block" - this would make the error clearer |
…TEXT correctly * DataInputStream is no longer useful. Change Handbuilterparser type * If END_TEXT and START_TEXT are in the same line, NOCommentInpurStream was not able to identify it. Signed-off-by: rtgdk <rohit.lodhartg@gmail.com>
* Add a new String ArrayList to store the lines of the file. * Add a method to return the index of a line. * Add a InputStream Constructor for HandBuiltParser to handle Test Java files. Signed-off-by: rtgdk <rohit.lodhartg@gmail.com>
I have added a method to retrieve the line no. of the error by storing every line of the file in an ArrayList. |
Signed-off-by: rtgdk <rohit.lodhartg@gmail.com>
Signed-off-by: rtgdk <rohit.lodhartg@gmail.com>
I fixed the unit test failure. The failure was due to an invalid type cast. Changing the type cast to instantiating a new NoCommentInputStream with the previous input stream as a constructor parameter fixed the problem. @rtgdk in the future, please run the unit tests before creating the pull requests |
Thanks. Will keep that in mind. 👍 |
Signed-off-by: rtgdk rohit.lodhartg@gmail.com