summaryrefslogtreecommitdiffstats
path: root/docprocs
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-09-13 11:12:13 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2018-09-13 11:12:13 +0200
commit05431891ad242bdae552a065acab030b149ad2ae (patch)
tree18056a625958e87eee7d79834399547d03988c68 /docprocs
parente6c49f90583b8e13bf900be110d4aa4cb99a26cf (diff)
Add deprecation comments and some renaming.
Diffstat (limited to 'docprocs')
-rw-r--r--docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java2
-rw-r--r--docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java10
2 files changed, 6 insertions, 6 deletions
diff --git a/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java b/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java
index 62be2868708..4905f3d9dad 100644
--- a/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java
+++ b/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java
@@ -57,7 +57,7 @@ public class DocumentScript {
removeAnyLinguisticsSpanTree(valueUpdate);
}
}
- for (FieldPathUpdate fieldUpdate : update.getFieldPathUpdates()) {
+ for (FieldPathUpdate fieldUpdate : update.fieldPathUpdates()) {
requireThatFieldIsDeclaredInDocument(fieldUpdate.getFieldPath().get(0).getFieldRef());
if (fieldUpdate instanceof AssignFieldPathUpdate) {
removeAnyLinguisticsSpanTree(((AssignFieldPathUpdate)fieldUpdate).getFieldValue());
diff --git a/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java b/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java
index c0a5cfd2153..cfaee10a07d 100644
--- a/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java
+++ b/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java
@@ -187,8 +187,8 @@ public class DocumentScriptTestCase {
FieldPathUpdate executeWithUpdateAndExpectFieldPath(String fieldName, FieldPathUpdate updateIn) {
DocumentUpdate update = executeWithUpdate(fieldName, updateIn);
- assertEquals(1, update.getFieldPathUpdates().size());
- return update.getFieldPathUpdates().get(0);
+ assertEquals(1, update.fieldPathUpdates().size());
+ return update.fieldPathUpdates().iterator().next();
}
}
@@ -229,10 +229,10 @@ public class DocumentScriptTestCase {
StringFieldValue newTitleValue = new StringFieldValue("iron moose 4, moose with a vengeance");
DocumentUpdate update = f.executeWithUpdate("structfield", new AssignFieldPathUpdate(f.type, "structfield.title", newTitleValue));
- assertEquals(1, update.getFieldPathUpdates().size());
+ assertEquals(1, update.fieldPathUpdates().size());
assertEquals(0, update.fieldUpdates().size());
- assertTrue(update.getFieldPathUpdates().get(0) instanceof AssignFieldPathUpdate);
- AssignFieldPathUpdate assignUpdate = (AssignFieldPathUpdate)update.getFieldPathUpdates().get(0);
+ assertTrue(update.fieldPathUpdates().iterator().next() instanceof AssignFieldPathUpdate);
+ AssignFieldPathUpdate assignUpdate = (AssignFieldPathUpdate)update.fieldPathUpdates().iterator().next();
assertEquals("structfield.title", assignUpdate.getOriginalFieldPath());
assertEquals(newTitleValue, assignUpdate.getFieldValue());
}