Skip to content
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

Fix exception while parsing for timestamps like hh:mm:ss without dates #1

Open
vizsatiz opened this issue Apr 16, 2020 · 0 comments
Open

Comments

@vizsatiz
Copy link
Collaborator

vizsatiz commented Apr 16, 2020

Sample input: 22:55:4
Debug Logs:

ch:2 state:2 map:{NUM=2, TYP=NUM}
ch:2 state:3 map:{NUM=22, TYP=NUM}
ch:: state:4 map:{HH=22, TYP=DATE}
ch:5 state:5 map:{HH=22, mm=5, TYP=DATE}
ch:5 state:5 map:{HH=22, mm=55, TYP=DATE}
ch:: state:6 map:{HH=22, mm=55, TYP=DATE}
ch:4 state:-1 map:{HH=22, mm=55, ss=4, TYP=DATE}

Exception:

String index out of range: 8
java.lang.StringIndexOutOfBoundsException: String index out of range: 8
	at java.lang.String.substring(String.java:1963)
	at com.twelfthmile.kyuga.Kyuga.prepareResult(kYuga.kt:168)
	at com.twelfthmile.kyuga.Kyuga.getResponse(kYuga.kt:128)
	at com.twelfthmile.kyuga.Kyuga.parse(kYuga.kt:145)
	at com.twelfthmile.kyuga.Kyuga.tokenise(kYuga.kt:77)
	at YugaTest.on tokenize - valid offer- should tokenize(YugaTest.kt:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant