summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-06-15 13:37:03 +0200
committerJon Bratseth <bratseth@gmail.com>2022-06-15 13:37:03 +0200
commit188999a50a45f11a4bbe8f56fee1a8ecabb4b97f (patch)
tree51fd1e23139c861fe2bd6ff0fd1afa3ba86ecaec /document
parentf1b86b698d629afb08569c9fd0f39dfb1da71f0d (diff)
No functional changes
Diffstat (limited to 'document')
-rw-r--r--document/src/main/java/com/yahoo/document/ReferenceDataType.java2
-rw-r--r--document/src/main/java/com/yahoo/document/datatypes/ReferenceFieldValue.java7
2 files changed, 4 insertions, 5 deletions
diff --git a/document/src/main/java/com/yahoo/document/ReferenceDataType.java b/document/src/main/java/com/yahoo/document/ReferenceDataType.java
index 8cf6b665acf..ee1afa086d7 100644
--- a/document/src/main/java/com/yahoo/document/ReferenceDataType.java
+++ b/document/src/main/java/com/yahoo/document/ReferenceDataType.java
@@ -16,7 +16,7 @@ public class ReferenceDataType extends DataType {
// Magic number for Identifiable, see document/util/identifiable.h
public static final int classId = registerClass(Ids.document + 68, ReferenceDataType.class);
- private StructuredDataType targetType;
+ private final StructuredDataType targetType;
public ReferenceDataType(DocumentType targetType, int id) {
this((StructuredDataType)targetType, id);
diff --git a/document/src/main/java/com/yahoo/document/datatypes/ReferenceFieldValue.java b/document/src/main/java/com/yahoo/document/datatypes/ReferenceFieldValue.java
index b76c3f2989f..ebc39b14eb1 100644
--- a/document/src/main/java/com/yahoo/document/datatypes/ReferenceFieldValue.java
+++ b/document/src/main/java/com/yahoo/document/datatypes/ReferenceFieldValue.java
@@ -49,6 +49,7 @@ public class ReferenceFieldValue extends FieldValue {
/**
* Creates a reference pointing to a particular document instance in the document
* type referenced by <code>referenceType</code>.
+ *
* @param referenceType reference target type
* @param documentId document ID of the same document type as that given by <code>referenceType</code>
* @throws IllegalArgumentException if documentId is not of the expected document type
@@ -64,7 +65,7 @@ public class ReferenceFieldValue extends FieldValue {
}
private static void requireIdOfMatchingType(ReferenceDataType referenceType, DocumentId id) {
- final String expectedTypeName = referenceType.getTargetType().getName();
+ String expectedTypeName = referenceType.getTargetType().getName();
if (!id.getDocType().equals(expectedTypeName)) {
throw new IllegalArgumentException(String.format(
"Can't assign document ID '%s' (of type '%s') to reference of document type '%s'",
@@ -87,9 +88,7 @@ public class ReferenceFieldValue extends FieldValue {
}
@Override
- public void printXml(XmlStream xml) {
- // TODO do we need/want this?
- }
+ public void printXml(XmlStream xml) { }
@Override
public void clear() {