diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-03-12 15:32:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 15:32:46 +0100 |
commit | ffaf23b9d65ae9c2713698ba4aee0efef7200030 (patch) | |
tree | 6b095e0b7dee674685e8031023151172d4577071 /document/src/main/java/com/yahoo/document/DocumentUpdate.java | |
parent | 84bf457b193f3cbd5fc481334e2f8c83103c9d80 (diff) | |
parent | 783a712f4b9dfc892170a923fd7baf3d416f4856 (diff) |
Merge pull request #30597 from vespa-engine/hmusum/support-serializing-document-update-to-jsonv8.318.18
Add support for serializing document update to json
Diffstat (limited to 'document/src/main/java/com/yahoo/document/DocumentUpdate.java')
-rw-r--r-- | document/src/main/java/com/yahoo/document/DocumentUpdate.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/document/src/main/java/com/yahoo/document/DocumentUpdate.java b/document/src/main/java/com/yahoo/document/DocumentUpdate.java index d3063b76feb..20d9b352d2d 100644 --- a/document/src/main/java/com/yahoo/document/DocumentUpdate.java +++ b/document/src/main/java/com/yahoo/document/DocumentUpdate.java @@ -147,7 +147,7 @@ public class DocumentUpdate extends DocumentOperation implements Iterable<FieldP Map.Entry<Integer, FieldUpdate> entry = iter.next(); FieldUpdate update = entry.getValue(); if (!update.isEmpty()) { - ValueUpdate last = update.getValueUpdate(update.size() - 1); + ValueUpdate<?> last = update.getValueUpdate(update.size() - 1); if (last instanceof AssignValueUpdate) { FieldValue currentValue = doc.getFieldValue(update.getField()); if ((currentValue != null) && currentValue.equals(last.getValue())) { @@ -190,7 +190,7 @@ public class DocumentUpdate extends DocumentOperation implements Iterable<FieldP /** Returns the type of the document this updates * - * @return The documentype of the document + * @return The document type of the document */ public DocumentType getDocumentType() { return documentType; @@ -357,9 +357,7 @@ public class DocumentUpdate extends DocumentOperation implements Iterable<FieldP @Override public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof DocumentUpdate)) return false; - - DocumentUpdate that = (DocumentUpdate) o; + if (!(o instanceof DocumentUpdate that)) return false; if (docId != null ? !docId.equals(that.docId) : that.docId != null) return false; if (documentType != null ? !documentType.equals(that.documentType) : that.documentType != null) return false; @@ -413,7 +411,7 @@ public class DocumentUpdate extends DocumentOperation implements Iterable<FieldP } /** - * Returns whether or not this field update contains any field- or field path updates. + * Returns whether this field update contains any field- or field path updates. * * @return True if this update is empty. */ |