I have the ConcurrentModifcationException raised, on the following snippet, which does not make sense based on what I read on what causes this error (modifying something you have an open iterator over):
List<Field> kibanaFields = Arrays.asList(KibanaRow.class.getSuperclass().getDeclaredFields());
kibanaFields.addAll(Arrays.asList(KibanaRow.class.getDeclaredFields()));
Second line, is where it happens. I don't understand this.. even if the first line had some iterator implemented inside, it should have been closed by the time it returns and second method runs.
The purpose here, is to get a list of field names, and later on add the value of @JsonPropertyannotation, on each of the KibanaRow's fields.