Details
-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0.0
-
Fix Version/s: None
-
Component/s: Morphlines Module
-
Labels:None
Description
If a morphlines split command has the same inputField and outputField, a ConcurrentModificationException is thrown.
Presumably this is because the field is still being iterated over when the new split values are written to the field.
I suspect (but have not tested) that the same issue would occur when multiple outputFields are used instead.
At a minimum, the documentation could warn that the input and output field names must be different.
Better, the command could check the input and output field names and emit a more meaningful exception.
Ideally, I would like to see this work without error, with the option to either add the split values to the existing values, or overwrite the existing values with the split values. I guess the latter should probably be the default.
Workaround: either a) change the outputField name, b) give the inputField a different name in the first place, or c) copy the input field to a temporary field and delete the existing values before splitting the temporary field back into the original field.