Skip to content

RVR highest reportable parsing fails #2

@pasniak

Description

@pasniak

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') {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions