[ https://issues.apache.org/jira/browse/METRON-1849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16709401#comment-16709401 ]
ASF GitHub Bot commented on METRON-1849: ---------------------------------------- Github user mmiklavc commented on a diff in the pull request: https://github.com/apache/metron/pull/1254#discussion_r238876879 --- Diff: metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/update/Document.java --- @@ -89,46 +91,29 @@ public void setGuid(String guid) { this.guid = guid; } - @Override - public String toString() { - return "Document{" + - "timestamp=" + timestamp + - ", document=" + document + - ", guid='" + guid + '\'' + - ", sensorType='" + sensorType + '\'' + - '}'; - } - @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - + if (this == o) return true; + if (!(o instanceof Document)) return false; Document document1 = (Document) o; - - if (timestamp != null ? !timestamp.equals(document1.timestamp) : document1.timestamp != null) { - return false; - } - if (document != null ? !document.equals(document1.document) : document1.document != null) { - return false; - } - if (guid != null ? !guid.equals(document1.guid) : document1.guid != null) { - return false; - } - return sensorType != null ? sensorType.equals(document1.sensorType) - : document1.sensorType == null; + return Objects.equals(timestamp, document1.timestamp) && --- End diff -- Is this change to equals and hashcode an auto-create from IntelliJ? > Elasticsearch Index Write Functionality Should be Shared > -------------------------------------------------------- > > Key: METRON-1849 > URL: https://issues.apache.org/jira/browse/METRON-1849 > Project: Metron > Issue Type: Bug > Reporter: Nick Allen > Assignee: Nick Allen > Priority: Major > > The index write functionality is currently duplicated between the > ElasticsearchWriter and the ElasticsearchUpdateDao. This functionality > should be de-duplicated and shared between the two. -- This message was sent by Atlassian JIRA (v7.6.3#76005)