You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call context.getSelectedHeaders() and the header has not yet been extracted by the read input thread (which means extractedFieldIndexes will be null), it will force the header extraction, but return the extracted headers and not the selectedHeaders (see code below).
To work around you can call context.parsedHeaders() or context.headers() first, which will force header extraction, after which context.getSelectedHeaders() will return the correct values.
Debug output calling context.selectedHeaders() multiple times shows this (the first line is from outside of the parser prior to calling parse()).
If you call
context.getSelectedHeaders()
and the header has not yet been extracted by the read input thread (which meansextractedFieldIndexes
will be null), it will force the header extraction, but return the extracted headers and not the selectedHeaders (see code below).To work around you can call context.parsedHeaders() or context.headers() first, which will force header extraction, after which
context.getSelectedHeaders()
will return the correct values.Debug output calling
context.selectedHeaders()
multiple times shows this (the first line is from outside of the parser prior to calling parse()).The DefaultContext selectedHeaders() method:
I can think of two simple ways to address the issue:
The text was updated successfully, but these errors were encountered: