From 5d837c3826f54e76f06435867e3dc33be423a7dd Mon Sep 17 00:00:00 2001 From: Yaliang <49084640+ylwu-amzn@users.noreply.github.com> Date: Tue, 10 Dec 2019 14:42:53 -0800 Subject: [PATCH] fix parse exception of ad result response (#132) * fix parse exception of ad result response --- .../ad/transport/AnomalyResultResponse.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/notification/src/main/java/com/amazon/elasticsearch/ad/transport/AnomalyResultResponse.java b/notification/src/main/java/com/amazon/elasticsearch/ad/transport/AnomalyResultResponse.java index 053880cb..d28c08c0 100644 --- a/notification/src/main/java/com/amazon/elasticsearch/ad/transport/AnomalyResultResponse.java +++ b/notification/src/main/java/com/amazon/elasticsearch/ad/transport/AnomalyResultResponse.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.List; +import com.amazon.elasticsearch.ad.model.FeatureData; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.io.stream.InputStreamStreamInput; import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; @@ -14,8 +15,6 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; -import com.amazon.elasticsearch.ad.model.FeatureData; - public class AnomalyResultResponse extends ActionResponse implements ToXContentObject { public static final String ANOMALY_GRADE_JSON_KEY = "anomalyGrade"; public static final String CONFIDENCE_JSON_KEY = "confidence"; @@ -39,10 +38,10 @@ public AnomalyResultResponse(StreamInput in) throws IOException { int size = in.readVInt(); features = new ArrayList(); for (int i=0; i