diff options
Diffstat (limited to 'document/src/test/java')
100 files changed, 330 insertions, 330 deletions
diff --git a/document/src/test/java/com/yahoo/document/BucketIdFactoryTestCase.java b/document/src/test/java/com/yahoo/document/BucketIdFactoryTestCase.java index 7df271035f7..75768d464be 100644 --- a/document/src/test/java/com/yahoo/document/BucketIdFactoryTestCase.java +++ b/document/src/test/java/com/yahoo/document/BucketIdFactoryTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.BucketIdFactory; diff --git a/document/src/test/java/com/yahoo/document/DataTypeNameTestCase.java b/document/src/test/java/com/yahoo/document/DataTypeNameTestCase.java index c7d9ac93592..8dbad32d820 100644 --- a/document/src/test/java/com/yahoo/document/DataTypeNameTestCase.java +++ b/document/src/test/java/com/yahoo/document/DataTypeNameTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/DataTypeTestCase.java b/document/src/test/java/com/yahoo/document/DataTypeTestCase.java index 7a22541c619..e497845248e 100644 --- a/document/src/test/java/com/yahoo/document/DataTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/DataTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import java.util.ArrayList; diff --git a/document/src/test/java/com/yahoo/document/DocInDocTestCase.java b/document/src/test/java/com/yahoo/document/DocInDocTestCase.java index 2fdc605355b..63c38303161 100644 --- a/document/src/test/java/com/yahoo/document/DocInDocTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocInDocTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.Array; diff --git a/document/src/test/java/com/yahoo/document/DocumentCalculatorTestCase.java b/document/src/test/java/com/yahoo/document/DocumentCalculatorTestCase.java index 0e7eb72ee07..c16077d407a 100755 --- a/document/src/test/java/com/yahoo/document/DocumentCalculatorTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentCalculatorTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.ByteFieldValue; diff --git a/document/src/test/java/com/yahoo/document/DocumentIdTestCase.java b/document/src/test/java/com/yahoo/document/DocumentIdTestCase.java index defb86387ab..75dfd612ec4 100644 --- a/document/src/test/java/com/yahoo/document/DocumentIdTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentIdTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/document/DocumentPathUpdateTestCase.java b/document/src/test/java/com/yahoo/document/DocumentPathUpdateTestCase.java index c414bea2cfa..40cfe762289 100755 --- a/document/src/test/java/com/yahoo/document/DocumentPathUpdateTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentPathUpdateTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.*; diff --git a/document/src/test/java/com/yahoo/document/DocumentRemoveTestCase.java b/document/src/test/java/com/yahoo/document/DocumentRemoveTestCase.java index 62d65400d7b..9acd40770dc 100644 --- a/document/src/test/java/com/yahoo/document/DocumentRemoveTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentRemoveTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/DocumentSerializationTestCase.java b/document/src/test/java/com/yahoo/document/DocumentSerializationTestCase.java index d57d29db81b..8090138ed2a 100644 --- a/document/src/test/java/com/yahoo/document/DocumentSerializationTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentSerializationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.compress.CompressionType; diff --git a/document/src/test/java/com/yahoo/document/DocumentTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTestCase.java index 9a9e7042745..47a4c377da0 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.compress.CompressionType; diff --git a/document/src/test/java/com/yahoo/document/DocumentTestCaseBase.java b/document/src/test/java/com/yahoo/document/DocumentTestCaseBase.java index 11f2103f238..48fb44fa260 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTestCaseBase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTestCaseBase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.FloatFieldValue; diff --git a/document/src/test/java/com/yahoo/document/DocumentTypeIdTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTypeIdTestCase.java index e086aa63d09..16f757d4379 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTypeIdTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTypeIdTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java index e6c020e6688..aa4f5211df7 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.annotation.*; diff --git a/document/src/test/java/com/yahoo/document/DocumentTypeTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTypeTestCase.java index f36b4f1d6db..5416a5cc7f4 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import java.util.Iterator; diff --git a/document/src/test/java/com/yahoo/document/DocumentUpdateTestCase.java b/document/src/test/java/com/yahoo/document/DocumentUpdateTestCase.java index 02773c7dad0..2976aebf802 100644 --- a/document/src/test/java/com/yahoo/document/DocumentUpdateTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentUpdateTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.*; diff --git a/document/src/test/java/com/yahoo/document/DocumentUtilTestCase.java b/document/src/test/java/com/yahoo/document/DocumentUtilTestCase.java index 60d4e994bff..2cf9123b987 100644 --- a/document/src/test/java/com/yahoo/document/DocumentUtilTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentUtilTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; /** diff --git a/document/src/test/java/com/yahoo/document/FieldPathEntryTestCase.java b/document/src/test/java/com/yahoo/document/FieldPathEntryTestCase.java index 064cadc0db9..059d65f88f8 100644 --- a/document/src/test/java/com/yahoo/document/FieldPathEntryTestCase.java +++ b/document/src/test/java/com/yahoo/document/FieldPathEntryTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/FieldTestCase.java b/document/src/test/java/com/yahoo/document/FieldTestCase.java index b8be9e85813..86ae686ba3e 100644 --- a/document/src/test/java/com/yahoo/document/FieldTestCase.java +++ b/document/src/test/java/com/yahoo/document/FieldTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; /** diff --git a/document/src/test/java/com/yahoo/document/GlobalIdTestCase.java b/document/src/test/java/com/yahoo/document/GlobalIdTestCase.java index 30b8f4c42ea..654536e7dff 100644 --- a/document/src/test/java/com/yahoo/document/GlobalIdTestCase.java +++ b/document/src/test/java/com/yahoo/document/GlobalIdTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import java.util.Arrays; diff --git a/document/src/test/java/com/yahoo/document/IdIdStringTest.java b/document/src/test/java/com/yahoo/document/IdIdStringTest.java index bbdf45ec088..88b5f38ec0c 100644 --- a/document/src/test/java/com/yahoo/document/IdIdStringTest.java +++ b/document/src/test/java/com/yahoo/document/IdIdStringTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.idstring.IdIdString; diff --git a/document/src/test/java/com/yahoo/document/IncompatibleFieldTypesTest.java b/document/src/test/java/com/yahoo/document/IncompatibleFieldTypesTest.java index 9e0c4e353f2..286f7d72b24 100644 --- a/document/src/test/java/com/yahoo/document/IncompatibleFieldTypesTest.java +++ b/document/src/test/java/com/yahoo/document/IncompatibleFieldTypesTest.java @@ -1,44 +1,44 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.document;
-
-import com.yahoo.document.datatypes.*;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests for ticket 6394548
- */
-public class IncompatibleFieldTypesTest {
- private DataType arrayOfStrings;
- private StructDataType struct;
- private StructuredFieldValue root;
-
- @Before
- public void setUp() {
- arrayOfStrings = new ArrayDataType(DataType.STRING);
- struct = new StructDataType("fancypants");
- struct.addField(new Field("stringarray", arrayOfStrings, false));
- DataType weightedSetOfStrings = DataType.getWeightedSet(DataType.STRING, false, false);
- struct.addField(new Field("stringws", weightedSetOfStrings, false));
-
- root = struct.createFieldValue();
- root.setFieldValue("stringarray", arrayOfStrings.createFieldValue());
- root.setFieldValue("stringws", weightedSetOfStrings.createFieldValue());
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testAddingIncompatibleFieldToArrayFails() {
- System.out.println(root.getFieldValue("stringarray").getDataType().createFieldValue().getClass().getName());
- System.out.println(root.getFieldValue("stringarray").getDataType().createFieldValue().getDataType().toString());
-
- ((Array)root.getFieldValue("stringarray")).add(new IntegerFieldValue(1234));
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testAddingIncompatibleFieldToWeightedSetFails() {
- System.out.println(root.getFieldValue("stringws").getDataType().createFieldValue().getClass().getName());
- System.out.println(root.getFieldValue("stringws").getDataType().createFieldValue().getDataType().toString());
-
- ((WeightedSet<FieldValue>)root.getFieldValue("stringws")).put(new IntegerFieldValue(1234), 100);
- }
-}
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.document; + +import com.yahoo.document.datatypes.*; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests for ticket 6394548 + */ +public class IncompatibleFieldTypesTest { + private DataType arrayOfStrings; + private StructDataType struct; + private StructuredFieldValue root; + + @Before + public void setUp() { + arrayOfStrings = new ArrayDataType(DataType.STRING); + struct = new StructDataType("fancypants"); + struct.addField(new Field("stringarray", arrayOfStrings, false)); + DataType weightedSetOfStrings = DataType.getWeightedSet(DataType.STRING, false, false); + struct.addField(new Field("stringws", weightedSetOfStrings, false)); + + root = struct.createFieldValue(); + root.setFieldValue("stringarray", arrayOfStrings.createFieldValue()); + root.setFieldValue("stringws", weightedSetOfStrings.createFieldValue()); + } + + @Test(expected = IllegalArgumentException.class) + public void testAddingIncompatibleFieldToArrayFails() { + System.out.println(root.getFieldValue("stringarray").getDataType().createFieldValue().getClass().getName()); + System.out.println(root.getFieldValue("stringarray").getDataType().createFieldValue().getDataType().toString()); + + ((Array)root.getFieldValue("stringarray")).add(new IntegerFieldValue(1234)); + } + + @Test(expected = IllegalArgumentException.class) + public void testAddingIncompatibleFieldToWeightedSetFails() { + System.out.println(root.getFieldValue("stringws").getDataType().createFieldValue().getClass().getName()); + System.out.println(root.getFieldValue("stringws").getDataType().createFieldValue().getDataType().toString()); + + ((WeightedSet<FieldValue>)root.getFieldValue("stringws")).put(new IntegerFieldValue(1234), 100); + } +} diff --git a/document/src/test/java/com/yahoo/document/NumericDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/NumericDataTypeTestCase.java index ebd63aa47b5..05f68570e60 100644 --- a/document/src/test/java/com/yahoo/document/NumericDataTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/NumericDataTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.FieldValue; diff --git a/document/src/test/java/com/yahoo/document/PositionTypeTestCase.java b/document/src/test/java/com/yahoo/document/PositionTypeTestCase.java index 1e05c46f898..84a4993158d 100644 --- a/document/src/test/java/com/yahoo/document/PositionTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/PositionTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.IntegerFieldValue; diff --git a/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java index ca0afb54835..2b5256843b7 100644 --- a/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/ReferenceDataTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.ReferenceFieldValue; diff --git a/document/src/test/java/com/yahoo/document/SimpleDocumentTestCase.java b/document/src/test/java/com/yahoo/document/SimpleDocumentTestCase.java index 853563165e4..3766220a6d9 100644 --- a/document/src/test/java/com/yahoo/document/SimpleDocumentTestCase.java +++ b/document/src/test/java/com/yahoo/document/SimpleDocumentTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.IntegerFieldValue; diff --git a/document/src/test/java/com/yahoo/document/StructDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/StructDataTypeTestCase.java index 6e5bfbb56d4..07b9512ee32 100755 --- a/document/src/test/java/com/yahoo/document/StructDataTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/StructDataTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.Struct; diff --git a/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java index 6f3abd85521..4a4895b7e78 100644 --- a/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import com.yahoo.document.datatypes.StringFieldValue; diff --git a/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java index aad0505c365..d785faa146a 100644 --- a/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/annotation/AbstractTypesTest.java b/document/src/test/java/com/yahoo/document/annotation/AbstractTypesTest.java index cc9cb8b2dd2..58992564372 100755 --- a/document/src/test/java/com/yahoo/document/annotation/AbstractTypesTest.java +++ b/document/src/test/java/com/yahoo/document/annotation/AbstractTypesTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListAdvTestCase.java b/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListAdvTestCase.java index e5950abe244..146f458b6e8 100644 --- a/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListAdvTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListAdvTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListTestCase.java b/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListTestCase.java index f6131a42e8a..47e514d74f5 100755 --- a/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/AlternateSpanListTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.datatypes.StringFieldValue; diff --git a/document/src/test/java/com/yahoo/document/annotation/AnnotationTestCase.java b/document/src/test/java/com/yahoo/document/annotation/AnnotationTestCase.java index 65ae706ec9a..de674aa3cca 100644 --- a/document/src/test/java/com/yahoo/document/annotation/AnnotationTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/AnnotationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeRegistryTestCase.java b/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeRegistryTestCase.java index 273d30b5426..cd68f0a0a7a 100644 --- a/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeRegistryTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeRegistryTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeTestCase.java index dcceb403564..10ea40d6f9e 100644 --- a/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/AnnotationTypeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/AnnotationTypesTestCase.java b/document/src/test/java/com/yahoo/document/annotation/AnnotationTypesTestCase.java index 7a2d3d006b2..cb3fe71923d 100644 --- a/document/src/test/java/com/yahoo/document/annotation/AnnotationTypesTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/AnnotationTypesTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.datatypes.DoubleFieldValue; diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug4155865TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug4155865TestCase.java index 6cf9ee8f683..8c885a33d8c 100644 --- a/document/src/test/java/com/yahoo/document/annotation/Bug4155865TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug4155865TestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug4164299TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug4164299TestCase.java index 3a88fb98f48..b29dddc7fb9 100644 --- a/document/src/test/java/com/yahoo/document/annotation/Bug4164299TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug4164299TestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.datatypes.StringFieldValue; diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug4259784TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug4259784TestCase.java index 035f6a95a19..70e0f3d23c4 100644 --- a/document/src/test/java/com/yahoo/document/annotation/Bug4259784TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug4259784TestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.ArrayDataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug4261985TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug4261985TestCase.java index 4d6d040bcf8..a3b33d4b915 100644 --- a/document/src/test/java/com/yahoo/document/annotation/Bug4261985TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug4261985TestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.ArrayDataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug4475379TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug4475379TestCase.java index c75e7300773..0291e23c888 100755 --- a/document/src/test/java/com/yahoo/document/annotation/Bug4475379TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug4475379TestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug6394548TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug6394548TestCase.java index ee448bb79b0..18f19030c9e 100644 --- a/document/src/test/java/com/yahoo/document/annotation/Bug6394548TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug6394548TestCase.java @@ -1,123 +1,123 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.document.annotation;
-
-import com.yahoo.document.Document;
-import com.yahoo.document.DocumentTypeManager;
-import com.yahoo.document.DocumentTypeManagerConfigurer;
-import com.yahoo.document.StructDataType;
-import com.yahoo.document.datatypes.*;
-import com.yahoo.document.serialization.*;
-import com.yahoo.io.GrowableByteBuffer;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.Collections;
-
-import static org.junit.Assert.*;
-
-public class Bug6394548TestCase {
- @Test
- public void testSerializeAndDeserializeMultipleAdjacentStructAnnotations() {
- DocumentTypeManager manager = new DocumentTypeManager();
- DocumentTypeManagerConfigurer.configure(manager, "file:src/test/java/com/yahoo/document/annotation/documentmanager.6394548.cfg");
-
- AnnotationTypeRegistry registry = manager.getAnnotationTypeRegistry();
- AnnotationType featureSetType = registry.getType("morty.RICK_FEATURESET");
- assertNotNull(featureSetType);
-
- Document doc = new Document(manager.getDocumentType("article"), "doc:article:test");
- StringFieldValue sfv = new StringFieldValue("badger waltz");
-
- SpanList root = new SpanList();
- SpanNode node = new Span(0, sfv.getString().length());
- root.add(node);
-
- SpanTree tree = new SpanTree("rick_features", root);
- for (int i = 0; i < 2; ++i) {
- tree.annotate(createBigFeatureSetAnnotation(featureSetType));
- }
-
- sfv.setSpanTree(tree);
- doc.setFieldValue("title", sfv);
- System.out.println(doc.toXml());
- String annotationsBefore = dumpAllAnnotations(tree);
-
- GrowableByteBuffer buffer = new GrowableByteBuffer();
- DocumentSerializer serializer = DocumentSerializerFactory.create42(buffer);
- serializer.write(doc);
-
- buffer.flip();
- DocumentDeserializer deserializer = DocumentDeserializerFactory.create42(manager, buffer);
- Document doc2 = new Document(deserializer);
-
- System.out.println(doc2.toXml());
-
- StringFieldValue readString = (StringFieldValue)doc2.getFieldValue("title");
- SpanTree readTree = readString.getSpanTree("rick_features");
- assertNotNull(readTree);
- String annotationsAfter = dumpAllAnnotations(readTree);
-
- System.out.println("before:\n" + annotationsBefore);
- System.out.println("after:\n" + annotationsAfter);
-
- assertEquals(annotationsBefore, annotationsAfter);
- }
-
- private String dumpAllAnnotations(SpanTree tree) {
- ArrayList<String> tmp = new ArrayList<>();
- for (Annotation anno : tree) {
- Struct s = (Struct)anno.getFieldValue();
- tmp.add(s.toXml());
- }
- Collections.sort(tmp);
- StringBuilder annotations = new StringBuilder();
- for (String s : tmp) {
- annotations.append(s);
- }
- return annotations.toString();
- }
-
- private Annotation createBigFeatureSetAnnotation(AnnotationType featuresetAnno) {
- StructDataType featuresetType = (StructDataType)featuresetAnno.getDataType();
- Struct featureset = featuresetType.createFieldValue();
- System.out.println("featureset type: " + featureset.getDataType().toString());
-
- MapFieldValue<StringFieldValue, IntegerFieldValue> discreteValued
- = (MapFieldValue<StringFieldValue, IntegerFieldValue>)featuresetType.getField("discretevaluedfeatures").getDataType().createFieldValue();
- discreteValued.put(new StringFieldValue("foo"), new IntegerFieldValue(1234));
- discreteValued.put(new StringFieldValue("bar"), new IntegerFieldValue(567890123));
- featureset.setFieldValue("discretevaluedfeatures", discreteValued);
-
- MapFieldValue<StringFieldValue, DoubleFieldValue> realValued
- = (MapFieldValue<StringFieldValue, DoubleFieldValue>)featuresetType.getField("realvaluedfeatures").getDataType().createFieldValue();
- realValued.put(new StringFieldValue("foo"), new DoubleFieldValue(0.75));
- realValued.put(new StringFieldValue("bar"), new DoubleFieldValue(1.5));
- featureset.setFieldValue("realvaluedfeatures", realValued);
-
- Array<StringFieldValue> nested = (Array<StringFieldValue>)featureset.getField("foo10").getDataType().createFieldValue();
- nested.add(new StringFieldValue("baz"));
- nested.add(new StringFieldValue("blargh"));
- featureset.setFieldValue("foo10", nested);
-
- featureset.setFieldValue("foo1", new StringFieldValue("asdf"));
- featureset.setFieldValue("foo4", new StringFieldValue("qwerty"));
- featureset.setFieldValue("foo2", new IntegerFieldValue(555));
- featureset.setFieldValue("foo2", new IntegerFieldValue(8));
- featureset.setFieldValue("foo7", new IntegerFieldValue(1337));
- featureset.setFieldValue("foo8", new IntegerFieldValue(967867));
- featureset.setFieldValue("foo9", new DoubleFieldValue(123.45));
-
- Array<StringFieldValue> attributes = (Array<StringFieldValue>)featureset.getField("foo6").getDataType().createFieldValue();
- attributes.add(new StringFieldValue("adam"));
- attributes.add(new StringFieldValue("jamie"));
- attributes.add(new StringFieldValue("grant"));
- attributes.add(new StringFieldValue("tory"));
- attributes.add(new StringFieldValue("kari"));
- featureset.setFieldValue("variantattribute", attributes);
-
- Annotation anno = new Annotation(featuresetAnno);
- anno.setFieldValue(featureset);
-
- return anno;
- }
-}
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.document.annotation; + +import com.yahoo.document.Document; +import com.yahoo.document.DocumentTypeManager; +import com.yahoo.document.DocumentTypeManagerConfigurer; +import com.yahoo.document.StructDataType; +import com.yahoo.document.datatypes.*; +import com.yahoo.document.serialization.*; +import com.yahoo.io.GrowableByteBuffer; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.Collections; + +import static org.junit.Assert.*; + +public class Bug6394548TestCase { + @Test + public void testSerializeAndDeserializeMultipleAdjacentStructAnnotations() { + DocumentTypeManager manager = new DocumentTypeManager(); + DocumentTypeManagerConfigurer.configure(manager, "file:src/test/java/com/yahoo/document/annotation/documentmanager.6394548.cfg"); + + AnnotationTypeRegistry registry = manager.getAnnotationTypeRegistry(); + AnnotationType featureSetType = registry.getType("morty.RICK_FEATURESET"); + assertNotNull(featureSetType); + + Document doc = new Document(manager.getDocumentType("article"), "doc:article:test"); + StringFieldValue sfv = new StringFieldValue("badger waltz"); + + SpanList root = new SpanList(); + SpanNode node = new Span(0, sfv.getString().length()); + root.add(node); + + SpanTree tree = new SpanTree("rick_features", root); + for (int i = 0; i < 2; ++i) { + tree.annotate(createBigFeatureSetAnnotation(featureSetType)); + } + + sfv.setSpanTree(tree); + doc.setFieldValue("title", sfv); + System.out.println(doc.toXml()); + String annotationsBefore = dumpAllAnnotations(tree); + + GrowableByteBuffer buffer = new GrowableByteBuffer(); + DocumentSerializer serializer = DocumentSerializerFactory.create42(buffer); + serializer.write(doc); + + buffer.flip(); + DocumentDeserializer deserializer = DocumentDeserializerFactory.create42(manager, buffer); + Document doc2 = new Document(deserializer); + + System.out.println(doc2.toXml()); + + StringFieldValue readString = (StringFieldValue)doc2.getFieldValue("title"); + SpanTree readTree = readString.getSpanTree("rick_features"); + assertNotNull(readTree); + String annotationsAfter = dumpAllAnnotations(readTree); + + System.out.println("before:\n" + annotationsBefore); + System.out.println("after:\n" + annotationsAfter); + + assertEquals(annotationsBefore, annotationsAfter); + } + + private String dumpAllAnnotations(SpanTree tree) { + ArrayList<String> tmp = new ArrayList<>(); + for (Annotation anno : tree) { + Struct s = (Struct)anno.getFieldValue(); + tmp.add(s.toXml()); + } + Collections.sort(tmp); + StringBuilder annotations = new StringBuilder(); + for (String s : tmp) { + annotations.append(s); + } + return annotations.toString(); + } + + private Annotation createBigFeatureSetAnnotation(AnnotationType featuresetAnno) { + StructDataType featuresetType = (StructDataType)featuresetAnno.getDataType(); + Struct featureset = featuresetType.createFieldValue(); + System.out.println("featureset type: " + featureset.getDataType().toString()); + + MapFieldValue<StringFieldValue, IntegerFieldValue> discreteValued + = (MapFieldValue<StringFieldValue, IntegerFieldValue>)featuresetType.getField("discretevaluedfeatures").getDataType().createFieldValue(); + discreteValued.put(new StringFieldValue("foo"), new IntegerFieldValue(1234)); + discreteValued.put(new StringFieldValue("bar"), new IntegerFieldValue(567890123)); + featureset.setFieldValue("discretevaluedfeatures", discreteValued); + + MapFieldValue<StringFieldValue, DoubleFieldValue> realValued + = (MapFieldValue<StringFieldValue, DoubleFieldValue>)featuresetType.getField("realvaluedfeatures").getDataType().createFieldValue(); + realValued.put(new StringFieldValue("foo"), new DoubleFieldValue(0.75)); + realValued.put(new StringFieldValue("bar"), new DoubleFieldValue(1.5)); + featureset.setFieldValue("realvaluedfeatures", realValued); + + Array<StringFieldValue> nested = (Array<StringFieldValue>)featureset.getField("foo10").getDataType().createFieldValue(); + nested.add(new StringFieldValue("baz")); + nested.add(new StringFieldValue("blargh")); + featureset.setFieldValue("foo10", nested); + + featureset.setFieldValue("foo1", new StringFieldValue("asdf")); + featureset.setFieldValue("foo4", new StringFieldValue("qwerty")); + featureset.setFieldValue("foo2", new IntegerFieldValue(555)); + featureset.setFieldValue("foo2", new IntegerFieldValue(8)); + featureset.setFieldValue("foo7", new IntegerFieldValue(1337)); + featureset.setFieldValue("foo8", new IntegerFieldValue(967867)); + featureset.setFieldValue("foo9", new DoubleFieldValue(123.45)); + + Array<StringFieldValue> attributes = (Array<StringFieldValue>)featureset.getField("foo6").getDataType().createFieldValue(); + attributes.add(new StringFieldValue("adam")); + attributes.add(new StringFieldValue("jamie")); + attributes.add(new StringFieldValue("grant")); + attributes.add(new StringFieldValue("tory")); + attributes.add(new StringFieldValue("kari")); + featureset.setFieldValue("variantattribute", attributes); + + Annotation anno = new Annotation(featuresetAnno); + anno.setFieldValue(featureset); + + return anno; + } +} diff --git a/document/src/test/java/com/yahoo/document/annotation/Bug6425939TestCase.java b/document/src/test/java/com/yahoo/document/annotation/Bug6425939TestCase.java index d34d0da8e82..8f071650382 100644 --- a/document/src/test/java/com/yahoo/document/annotation/Bug6425939TestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/Bug6425939TestCase.java @@ -1,66 +1,66 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.document.annotation;
-
-import com.yahoo.document.DataType;
-import com.yahoo.document.DocumentTypeManager;
-import com.yahoo.document.Field;
-import com.yahoo.document.StructDataType;
-import com.yahoo.document.datatypes.StringFieldValue;
-import com.yahoo.document.datatypes.Struct;
-import com.yahoo.document.serialization.*;
-import com.yahoo.io.GrowableByteBuffer;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class Bug6425939TestCase {
- private DocumentTypeManager man;
- private StructDataType person;
- private AnnotationType personA;
-
- @Before
- public void setUp() {
- man = new DocumentTypeManager();
-
- person = new StructDataType("personStruct");
- person.addField(new Field("foo", DataType.STRING));
- person.addField(new Field("bar", DataType.INT));
- man.register(person);
-
- personA = new AnnotationType("person", person);
- man.getAnnotationTypeRegistry().register(personA);
- }
-
- @Test
- public void canDeserializeAnnotationsOnZeroLengthStrings() {
- StringFieldValue emptyString = new StringFieldValue("");
- emptyString.setSpanTree(createSpanTree());
-
- GrowableByteBuffer buffer = new GrowableByteBuffer(1024);
- DocumentSerializer serializer = DocumentSerializerFactory.create42(buffer);
- Field strField = new Field("flarn", DataType.STRING);
- serializer.write(strField, emptyString);
- buffer.flip();
-
- // Should not throw exception if bug 6425939 is fixed:
- DocumentDeserializer deserializer = DocumentDeserializerFactory.create42(man, buffer);
- StringFieldValue deserializedString = new StringFieldValue();
- deserializer.read(strField, deserializedString);
-
- assertEquals("", deserializedString.getString());
- SpanTree readTree = deserializedString.getSpanTree("SpanTree1");
- assertNotNull(readTree);
- }
-
- private SpanTree createSpanTree() {
- SpanList root = new SpanList();
- SpanTree tree = new SpanTree("SpanTree1", root);
- SpanNode node = new Span(0, 0);
- Struct ps = new Struct(person);
- ps.setFieldValue("foo", "epic badger");
- ps.setFieldValue("bar", 54321);
- tree.annotate(node, new Annotation(personA, ps));
- root.add(node);
- return tree;
- }
-}
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.document.annotation; + +import com.yahoo.document.DataType; +import com.yahoo.document.DocumentTypeManager; +import com.yahoo.document.Field; +import com.yahoo.document.StructDataType; +import com.yahoo.document.datatypes.StringFieldValue; +import com.yahoo.document.datatypes.Struct; +import com.yahoo.document.serialization.*; +import com.yahoo.io.GrowableByteBuffer; +import org.junit.Before; +import org.junit.Test; +import static org.junit.Assert.*; + +public class Bug6425939TestCase { + private DocumentTypeManager man; + private StructDataType person; + private AnnotationType personA; + + @Before + public void setUp() { + man = new DocumentTypeManager(); + + person = new StructDataType("personStruct"); + person.addField(new Field("foo", DataType.STRING)); + person.addField(new Field("bar", DataType.INT)); + man.register(person); + + personA = new AnnotationType("person", person); + man.getAnnotationTypeRegistry().register(personA); + } + + @Test + public void canDeserializeAnnotationsOnZeroLengthStrings() { + StringFieldValue emptyString = new StringFieldValue(""); + emptyString.setSpanTree(createSpanTree()); + + GrowableByteBuffer buffer = new GrowableByteBuffer(1024); + DocumentSerializer serializer = DocumentSerializerFactory.create42(buffer); + Field strField = new Field("flarn", DataType.STRING); + serializer.write(strField, emptyString); + buffer.flip(); + + // Should not throw exception if bug 6425939 is fixed: + DocumentDeserializer deserializer = DocumentDeserializerFactory.create42(man, buffer); + StringFieldValue deserializedString = new StringFieldValue(); + deserializer.read(strField, deserializedString); + + assertEquals("", deserializedString.getString()); + SpanTree readTree = deserializedString.getSpanTree("SpanTree1"); + assertNotNull(readTree); + } + + private SpanTree createSpanTree() { + SpanList root = new SpanList(); + SpanTree tree = new SpanTree("SpanTree1", root); + SpanNode node = new Span(0, 0); + Struct ps = new Struct(person); + ps.setFieldValue("foo", "epic badger"); + ps.setFieldValue("bar", 54321); + tree.annotate(node, new Annotation(personA, ps)); + root.add(node); + return tree; + } +} diff --git a/document/src/test/java/com/yahoo/document/annotation/DocTestCase.java b/document/src/test/java/com/yahoo/document/annotation/DocTestCase.java index 565cbd6c370..b290252685b 100644 --- a/document/src/test/java/com/yahoo/document/annotation/DocTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/DocTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.ArrayDataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/DummySpanNodeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/DummySpanNodeTestCase.java index f238b906f6b..d2c35f45ad8 100644 --- a/document/src/test/java/com/yahoo/document/annotation/DummySpanNodeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/DummySpanNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeAdvTest.java b/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeAdvTest.java index 790813abe73..9a68e730d1e 100644 --- a/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeAdvTest.java +++ b/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeAdvTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; /** diff --git a/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeTestCase.java index 8bad1bdc37d..8f77e7c584f 100644 --- a/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/IndexKeyAnnotationTypeSpanTreeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; /** diff --git a/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeAdvTest.java b/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeAdvTest.java index 49c34d1fee4..3db643b071f 100644 --- a/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeAdvTest.java +++ b/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeAdvTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; /** diff --git a/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeTestCase.java index dc685f3079d..52dcef61273 100644 --- a/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanNodeSpanTreeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; /** diff --git a/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanTreeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanTreeTestCase.java index 243367e4f54..3b403680577 100644 --- a/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanTreeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/IndexKeySpanTreeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/annotation/PeekableListIteratorTestCase.java b/document/src/test/java/com/yahoo/document/annotation/PeekableListIteratorTestCase.java index d63cd324033..aa6c1e05012 100644 --- a/document/src/test/java/com/yahoo/document/annotation/PeekableListIteratorTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/PeekableListIteratorTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import java.util.ArrayList; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanListAdvTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SpanListAdvTestCase.java index c43385f1572..be6e2146d78 100644 --- a/document/src/test/java/com/yahoo/document/annotation/SpanListAdvTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanListAdvTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanListTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SpanListTestCase.java index 73e2c65fd5f..887bfec5059 100755 --- a/document/src/test/java/com/yahoo/document/annotation/SpanListTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanListTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.datatypes.StringFieldValue; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanNodeAdvTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SpanNodeAdvTestCase.java index 9277d939168..d181549a753 100644 --- a/document/src/test/java/com/yahoo/document/annotation/SpanNodeAdvTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanNodeAdvTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanNodeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SpanNodeTestCase.java index b7d17779ea9..c5a14b2492d 100644 --- a/document/src/test/java/com/yahoo/document/annotation/SpanNodeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import java.util.ArrayList; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SpanTestCase.java index 47df445eff1..701f6917ecd 100755 --- a/document/src/test/java/com/yahoo/document/annotation/SpanTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.datatypes.StringFieldValue; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanTreeAdvTest.java b/document/src/test/java/com/yahoo/document/annotation/SpanTreeAdvTest.java index cfb87ee997d..852835ab8c4 100644 --- a/document/src/test/java/com/yahoo/document/annotation/SpanTreeAdvTest.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanTreeAdvTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/SpanTreeTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SpanTreeTestCase.java index e61d8d10d8a..393fe8b6688 100755 --- a/document/src/test/java/com/yahoo/document/annotation/SpanTreeTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SpanTreeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/annotation/SystemTestCase.java b/document/src/test/java/com/yahoo/document/annotation/SystemTestCase.java index e8afa472233..08ffabd093c 100755 --- a/document/src/test/java/com/yahoo/document/annotation/SystemTestCase.java +++ b/document/src/test/java/com/yahoo/document/annotation/SystemTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/document/datatypes/ArrayTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/ArrayTestCase.java index a2f0581f003..14624bc2fcc 100755 --- a/document/src/test/java/com/yahoo/document/datatypes/ArrayTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/ArrayTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.document.ArrayDataType; diff --git a/document/src/test/java/com/yahoo/document/datatypes/MapTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/MapTestCase.java index 0b15ccf9854..ff6f1544292 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/MapTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/MapTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import java.util.Map; diff --git a/document/src/test/java/com/yahoo/document/datatypes/NumericFieldValueTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/NumericFieldValueTestCase.java index 5a63453564d..be6fff2cfdd 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/NumericFieldValueTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/NumericFieldValueTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/datatypes/PredicateFieldValueTest.java b/document/src/test/java/com/yahoo/document/datatypes/PredicateFieldValueTest.java index b2b1fde0126..41c1daa047d 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/PredicateFieldValueTest.java +++ b/document/src/test/java/com/yahoo/document/datatypes/PredicateFieldValueTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/datatypes/RawTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/RawTestCase.java index a02446eee76..7513813b8b1 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/RawTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/RawTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/datatypes/ReferenceFieldValueTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/ReferenceFieldValueTestCase.java index a1d69238463..2615ed6d442 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/ReferenceFieldValueTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/ReferenceFieldValueTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/datatypes/StringFieldValueTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/StringFieldValueTestCase.java index 8a0bfe68e72..ae34de2c136 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/StringFieldValueTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/StringFieldValueTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/datatypes/StringTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/StringTestCase.java index cca39ee5bc4..fd2b4a3982d 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/StringTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/StringTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/datatypes/StructTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/StructTestCase.java index 76e1588b2a1..4197938f0ee 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/StructTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/StructTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/datatypes/TensorFieldValueTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/TensorFieldValueTestCase.java index c94c917d2ca..b92d374004f 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/TensorFieldValueTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/TensorFieldValueTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.tensor.Tensor; diff --git a/document/src/test/java/com/yahoo/document/datatypes/UriFieldValueTest.java b/document/src/test/java/com/yahoo/document/datatypes/UriFieldValueTest.java index 8fae87e5a29..f6e0f498862 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/UriFieldValueTest.java +++ b/document/src/test/java/com/yahoo/document/datatypes/UriFieldValueTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import org.junit.Test; diff --git a/document/src/test/java/com/yahoo/document/datatypes/WeightedSetTestCase.java b/document/src/test/java/com/yahoo/document/datatypes/WeightedSetTestCase.java index fb2122d9828..678a3c5b0e0 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/WeightedSetTestCase.java +++ b/document/src/test/java/com/yahoo/document/datatypes/WeightedSetTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.datatypes; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/datatypes/blog.sd b/document/src/test/java/com/yahoo/document/datatypes/blog.sd index 1263c09ff95..545c46cb149 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/blog.sd +++ b/document/src/test/java/com/yahoo/document/datatypes/blog.sd @@ -1,4 +1,4 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. search blog { document blog { diff --git a/document/src/test/java/com/yahoo/document/datatypes/documentmanager.blog.sd b/document/src/test/java/com/yahoo/document/datatypes/documentmanager.blog.sd index 313e8a88a3b..17768e87fcc 100644 --- a/document/src/test/java/com/yahoo/document/datatypes/documentmanager.blog.sd +++ b/document/src/test/java/com/yahoo/document/datatypes/documentmanager.blog.sd @@ -1,4 +1,4 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. enablecompression false datatype[7] datatype[0].id -945638949 diff --git a/document/src/test/java/com/yahoo/document/docindoc.sd b/document/src/test/java/com/yahoo/document/docindoc.sd index 83bc4254fb2..8b6acd71f47 100644 --- a/document/src/test/java/com/yahoo/document/docindoc.sd +++ b/document/src/test/java/com/yahoo/document/docindoc.sd @@ -1,4 +1,4 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. search docindoc { document docindoc { field name type string { header } diff --git a/document/src/test/java/com/yahoo/document/fieldset/FieldSetTestCase.java b/document/src/test/java/com/yahoo/document/fieldset/FieldSetTestCase.java index ef8346768ba..e9889d3149e 100644 --- a/document/src/test/java/com/yahoo/document/fieldset/FieldSetTestCase.java +++ b/document/src/test/java/com/yahoo/document/fieldset/FieldSetTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.fieldset; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/document/json/DocumentUpdateJsonSerializerTest.java b/document/src/test/java/com/yahoo/document/json/DocumentUpdateJsonSerializerTest.java index 2ee2adcba83..9235c9b908a 100644 --- a/document/src/test/java/com/yahoo/document/json/DocumentUpdateJsonSerializerTest.java +++ b/document/src/test/java/com/yahoo/document/json/DocumentUpdateJsonSerializerTest.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.json; import com.fasterxml.jackson.core.JsonFactory; diff --git a/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java b/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java index 69ff265e5c1..f37fa5ea675 100644 --- a/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java +++ b/document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.json; import com.fasterxml.jackson.core.JsonFactory; diff --git a/document/src/test/java/com/yahoo/document/json/JsonWriterTestCase.java b/document/src/test/java/com/yahoo/document/json/JsonWriterTestCase.java index 989b0f2c952..50d02d70c9b 100644 --- a/document/src/test/java/com/yahoo/document/json/JsonWriterTestCase.java +++ b/document/src/test/java/com/yahoo/document/json/JsonWriterTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.json; import com.fasterxml.jackson.core.JsonFactory; diff --git a/document/src/test/java/com/yahoo/document/outerdoc.sd b/document/src/test/java/com/yahoo/document/outerdoc.sd index dbdf3c32cd5..6fdbd402ffe 100644 --- a/document/src/test/java/com/yahoo/document/outerdoc.sd +++ b/document/src/test/java/com/yahoo/document/outerdoc.sd @@ -1,4 +1,4 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. search outerdoc { document outerdoc { field innerdocuments type array<docindoc> { body } diff --git a/document/src/test/java/com/yahoo/document/select/BucketSelectorTestCase.java b/document/src/test/java/com/yahoo/document/select/BucketSelectorTestCase.java index e8f91c934a4..9659abe713c 100644 --- a/document/src/test/java/com/yahoo/document/select/BucketSelectorTestCase.java +++ b/document/src/test/java/com/yahoo/document/select/BucketSelectorTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.select; import com.yahoo.document.BucketId; diff --git a/document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java b/document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java index 1677592eecf..7b6130185b4 100644 --- a/document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java +++ b/document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.select; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/document/select/OrderingSpecificationTestCase.java b/document/src/test/java/com/yahoo/document/select/OrderingSpecificationTestCase.java index e47fe4e993e..79b667b0079 100644 --- a/document/src/test/java/com/yahoo/document/select/OrderingSpecificationTestCase.java +++ b/document/src/test/java/com/yahoo/document/select/OrderingSpecificationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.select; import com.yahoo.document.select.*; diff --git a/document/src/test/java/com/yahoo/document/serialization/PredicateFieldValueSerializationTestCase.java b/document/src/test/java/com/yahoo/document/serialization/PredicateFieldValueSerializationTestCase.java index eb4e06dc149..01dd86fc8fa 100644 --- a/document/src/test/java/com/yahoo/document/serialization/PredicateFieldValueSerializationTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/PredicateFieldValueSerializationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/serialization/ReferenceFieldValueSerializationTestCase.java b/document/src/test/java/com/yahoo/document/serialization/ReferenceFieldValueSerializationTestCase.java index e35326c81c8..aa8b43e7abb 100644 --- a/document/src/test/java/com/yahoo/document/serialization/ReferenceFieldValueSerializationTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/ReferenceFieldValueSerializationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/document/serialization/SerializationHelperTestCase.java b/document/src/test/java/com/yahoo/document/serialization/SerializationHelperTestCase.java index 5f8c61c52ec..5bbcd4abc9a 100644 --- a/document/src/test/java/com/yahoo/document/serialization/SerializationHelperTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/SerializationHelperTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.datatypes.Raw; diff --git a/document/src/test/java/com/yahoo/document/serialization/SerializationTestUtils.java b/document/src/test/java/com/yahoo/document/serialization/SerializationTestUtils.java index e20efb4d61a..38cf2b0e9d1 100644 --- a/document/src/test/java/com/yahoo/document/serialization/SerializationTestUtils.java +++ b/document/src/test/java/com/yahoo/document/serialization/SerializationTestUtils.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/document/serialization/SerializeAnnotationsTestCase.java b/document/src/test/java/com/yahoo/document/serialization/SerializeAnnotationsTestCase.java index feb8a84da41..d3228e13f38 100644 --- a/document/src/test/java/com/yahoo/document/serialization/SerializeAnnotationsTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/SerializeAnnotationsTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/serialization/TensorFieldValueSerializationTestCase.java b/document/src/test/java/com/yahoo/document/serialization/TensorFieldValueSerializationTestCase.java index cc4b70b4a2e..7104c1686f8 100644 --- a/document/src/test/java/com/yahoo/document/serialization/TensorFieldValueSerializationTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/TensorFieldValueSerializationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/serialization/TestDocumentFactory.java b/document/src/test/java/com/yahoo/document/serialization/TestDocumentFactory.java index 2292199d8eb..13cab876942 100644 --- a/document/src/test/java/com/yahoo/document/serialization/TestDocumentFactory.java +++ b/document/src/test/java/com/yahoo/document/serialization/TestDocumentFactory.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/document/serialization/VespaDocumentSerializerTestCase.java b/document/src/test/java/com/yahoo/document/serialization/VespaDocumentSerializerTestCase.java index 3e742c9e618..119a2e5aeba 100644 --- a/document/src/test/java/com/yahoo/document/serialization/VespaDocumentSerializerTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/VespaDocumentSerializerTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.compress.CompressionType; diff --git a/document/src/test/java/com/yahoo/document/serialization/XmlDocumentWriterTestCase.java b/document/src/test/java/com/yahoo/document/serialization/XmlDocumentWriterTestCase.java index b185250cbd8..8f0ef317372 100644 --- a/document/src/test/java/com/yahoo/document/serialization/XmlDocumentWriterTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/XmlDocumentWriterTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/document/serialization/XmlStreamTestCase.java b/document/src/test/java/com/yahoo/document/serialization/XmlStreamTestCase.java index 57a7fc76427..8a519b4122d 100644 --- a/document/src/test/java/com/yahoo/document/serialization/XmlStreamTestCase.java +++ b/document/src/test/java/com/yahoo/document/serialization/XmlStreamTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.serialization; import com.yahoo.document.serialization.XmlStream; diff --git a/document/src/test/java/com/yahoo/document/update/FieldUpdateTestCase.java b/document/src/test/java/com/yahoo/document/update/FieldUpdateTestCase.java index e14922eb2df..d3bc3f9fa68 100644 --- a/document/src/test/java/com/yahoo/document/update/FieldUpdateTestCase.java +++ b/document/src/test/java/com/yahoo/document/update/FieldUpdateTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.update; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/document/update/SerializationTestCase.java b/document/src/test/java/com/yahoo/document/update/SerializationTestCase.java index 3fbea80c54b..bd3c0ff7322 100644 --- a/document/src/test/java/com/yahoo/document/update/SerializationTestCase.java +++ b/document/src/test/java/com/yahoo/document/update/SerializationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.update; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/document/update/ValueUpdateTestCase.java b/document/src/test/java/com/yahoo/document/update/ValueUpdateTestCase.java index d197f77669c..21fda8d3063 100644 --- a/document/src/test/java/com/yahoo/document/update/ValueUpdateTestCase.java +++ b/document/src/test/java/com/yahoo/document/update/ValueUpdateTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.update; import com.yahoo.document.datatypes.FieldValue; diff --git a/document/src/test/java/com/yahoo/vespaxmlparser/PositionParserTestCase.java b/document/src/test/java/com/yahoo/vespaxmlparser/PositionParserTestCase.java index a40e2a5a4a3..003660a287f 100644 --- a/document/src/test/java/com/yahoo/vespaxmlparser/PositionParserTestCase.java +++ b/document/src/test/java/com/yahoo/vespaxmlparser/PositionParserTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaxmlparser; import com.yahoo.document.Document; diff --git a/document/src/test/java/com/yahoo/vespaxmlparser/UriParserTestCase.java b/document/src/test/java/com/yahoo/vespaxmlparser/UriParserTestCase.java index 2b5bf0f2b3c..3f3408bf93e 100644 --- a/document/src/test/java/com/yahoo/vespaxmlparser/UriParserTestCase.java +++ b/document/src/test/java/com/yahoo/vespaxmlparser/UriParserTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaxmlparser; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/vespaxmlparser/VespaXMLReaderTestCase.java b/document/src/test/java/com/yahoo/vespaxmlparser/VespaXMLReaderTestCase.java index 19f753484d3..b5f74c8973e 100755 --- a/document/src/test/java/com/yahoo/vespaxmlparser/VespaXMLReaderTestCase.java +++ b/document/src/test/java/com/yahoo/vespaxmlparser/VespaXMLReaderTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaxmlparser; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlFieldReaderTestCase.java b/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlFieldReaderTestCase.java index 3dc6ebd1403..1c393cc36f1 100644 --- a/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlFieldReaderTestCase.java +++ b/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlFieldReaderTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaxmlparser; import com.yahoo.document.*; diff --git a/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlUpdateReaderTestCase.java b/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlUpdateReaderTestCase.java index 8a5fabde9ea..3c7d02bd6be 100644 --- a/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlUpdateReaderTestCase.java +++ b/document/src/test/java/com/yahoo/vespaxmlparser/VespaXmlUpdateReaderTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaxmlparser; import com.yahoo.document.DataType; diff --git a/document/src/test/java/com/yahoo/vespaxmlparser/XMLNumericFieldErrorMsgTestCase.java b/document/src/test/java/com/yahoo/vespaxmlparser/XMLNumericFieldErrorMsgTestCase.java index 1f74cd650ae..73984f1746c 100644 --- a/document/src/test/java/com/yahoo/vespaxmlparser/XMLNumericFieldErrorMsgTestCase.java +++ b/document/src/test/java/com/yahoo/vespaxmlparser/XMLNumericFieldErrorMsgTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaxmlparser; import com.yahoo.document.DataType; |