diff --git a/core/src/main/java/org/elasticsearch/ingest/core/CompoundProcessor.java b/core/src/main/java/org/elasticsearch/ingest/core/CompoundProcessor.java index bad94de6c2b..bc5fd19aac7 100644 --- a/core/src/main/java/org/elasticsearch/ingest/core/CompoundProcessor.java +++ b/core/src/main/java/org/elasticsearch/ingest/core/CompoundProcessor.java @@ -77,7 +77,7 @@ public class CompoundProcessor implements Processor { } else { executeOnFailure(ingestDocument, e, processor.getType()); } - return; + break; } } } diff --git a/core/src/main/java/org/elasticsearch/ingest/processor/DateProcessor.java b/core/src/main/java/org/elasticsearch/ingest/processor/DateProcessor.java index 45f05aab7e0..61a4d142043 100644 --- a/core/src/main/java/org/elasticsearch/ingest/processor/DateProcessor.java +++ b/core/src/main/java/org/elasticsearch/ingest/processor/DateProcessor.java @@ -19,6 +19,7 @@ package org.elasticsearch.ingest.processor; +import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.ingest.core.AbstractProcessorFactory; import org.elasticsearch.ingest.core.IngestDocument; import org.elasticsearch.ingest.core.ConfigurationUtils; @@ -78,9 +79,9 @@ public final class DateProcessor implements Processor { for (Function dateParser : dateParsers) { try { dateTime = dateParser.apply(value); - } catch(Exception e) { - //try the next parser and keep track of the last exception - lastException = e; + } catch (Exception e) { + //try the next parser and keep track of the exceptions + lastException = ExceptionsHelper.useOrSuppress(lastException, e); } } diff --git a/core/src/main/java/org/elasticsearch/ingest/processor/DeDotProcessor.java b/core/src/main/java/org/elasticsearch/ingest/processor/DeDotProcessor.java index 12cc3654967..6e0610d90d6 100644 --- a/core/src/main/java/org/elasticsearch/ingest/processor/DeDotProcessor.java +++ b/core/src/main/java/org/elasticsearch/ingest/processor/DeDotProcessor.java @@ -91,7 +91,9 @@ public class DeDotProcessor implements Processor { } else if (obj instanceof List) { @SuppressWarnings("unchecked") List list = (List) obj; - list.forEach(this::deDot); + for (Object value : list) { + deDot(value); + } } }