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

RVR highest reportable parsing fails #2

Open
pasniak opened this issue Dec 29, 2017 · 0 comments
Open

RVR highest reportable parsing fails #2

pasniak opened this issue Dec 29, 2017 · 0 comments

Comments

@pasniak
Copy link

pasniak commented Dec 29, 2017

Uncaught Exception during parse. Report: UMMS 290445Z 12003MPS 0450 R31/1200 FG VV001 04/04 Q1003 R31/290050 NOSIG Cause: java.lang.StringIndexOutOfBoundsException: String index out of range: 8

tokens = {ArrayList@937} size = 11
0 = "UMMS"
1 = "290445Z"
2 = "12003MPS"
3 = "0450"
4 = "R31/1200" <-- token[4] length 8, pos 8
5 = "FG"
6 = "VV001"
7 = "04/04"
8 = "Q1003"
9 = "R31/290050"
10 = "NOSIG"

                // if we are using the format with highest reportable
                if (((String) tokens.get(index)).charAt(pos) == 'V') {
                    pos++; // increment past V

possible fix

                String tokenHR = (String) tokens.get(index);
                if (tokenHR.length()<pos && tokenHR.charAt(pos) == 'V') {

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