Github user mattf-horton commented on a diff in the pull request:
@@ -34,15 +34,15 @@
* @param rawMessage
* @return If null is returned, this is treated as an empty list.
- List<T> parse(byte rawMessage);
+ List<T> parse(byte rawMessage, SensorParserConfig sensorParserConfig);
--- End diff --
Currently only the GrokParser wants to see the sensorParserConfig, right?
Then this patch could be significantly simplified, if desired, by providing
both one and two-argument polymorphisms of the parse() method. BasicParser
would provide an overridable implementation of the two-argument form as a
trivial call to the one-argument form. GrokParser can implement the
one-argument form with either an exception throw, or a two-argument call with
"current parserConfig" (which would need to be saved from the
GrokParser:configure() call). Of course the clients of GrokParser still need
to be modified, but all the non-Grok parsers and their unit tests no longer
need to change. I think that eliminates 20 of the 38 files in this patch.
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket