lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [4/6] lucenenet git commit: Changed IndexableField.BinaryValue() to IndexableField.BinaryValue (method into a property) for API consistency.
Date Mon, 15 Aug 2016 20:12:52 GMT
Changed IndexableField.BinaryValue() to IndexableField.BinaryValue (method into a property)
for API consistency.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/cf2396b9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/cf2396b9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/cf2396b9

Branch: refs/heads/master
Commit: cf2396b91a8e3b87ce978d7dbb4ec6cfc6b11b48
Parents: 87aa424
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Jul 29 00:54:44 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Jul 29 00:54:44 2016 +0700

----------------------------------------------------------------------
 .../Utils/DatasetSplitter.cs                    |  4 ++--
 .../SimpleText/SimpleTextStoredFieldsWriter.cs  |  2 +-
 .../CompressingStoredFieldsWriter.cs            |  2 +-
 .../Lucene40/Lucene40StoredFieldsWriter.cs      |  2 +-
 src/Lucene.Net.Core/Document/Document.cs        |  4 ++--
 src/Lucene.Net.Core/Document/Field.cs           | 17 +++++++------
 src/Lucene.Net.Core/Index/DocValuesProcessor.cs |  6 ++---
 src/Lucene.Net.Core/Index/IndexableField.cs     |  2 +-
 .../lucene3x/PreFlexRWStoredFieldsWriter.cs     |  2 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     | 12 +++++-----
 .../Util/LuceneTestCase.cs                      |  2 +-
 src/Lucene.Net.TestFramework/Util/TestUtil.cs   |  4 ++--
 .../core/Document/TestDocument.cs               |  2 +-
 src/Lucene.Net.Tests/core/Document/TestField.cs |  6 ++---
 .../core/Index/TestDirectoryReader.cs           |  8 +++----
 .../core/Index/TestIndexWriter.cs               |  8 +++----
 .../core/Index/TestIndexWriterExceptions.cs     |  4 ++--
 .../core/Index/TestIndexableField.cs            | 25 +++++++++++---------
 .../core/Index/TestStressIndexing2.cs           |  4 ++--
 19 files changed, 61 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Classification/Utils/DatasetSplitter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Classification/Utils/DatasetSplitter.cs b/src/Lucene.Net.Classification/Utils/DatasetSplitter.cs
index 3b91dc4..7d8dfbc 100644
--- a/src/Lucene.Net.Classification/Utils/DatasetSplitter.cs
+++ b/src/Lucene.Net.Classification/Utils/DatasetSplitter.cs
@@ -99,9 +99,9 @@ namespace Lucene.Net.Classification.Utils
                             {
                                 doc.Add(new Field(storableField.Name, storableField.ReaderValue,
ft));
                             }
-                            else if (storableField.BinaryValue() != null)
+                            else if (storableField.BinaryValue != null)
                             {
-                                doc.Add(new Field(storableField.Name, storableField.BinaryValue(),
ft));
+                                doc.Add(new Field(storableField.Name, storableField.BinaryValue,
ft));
                             }
                             else if (storableField.StringValue != null)
                             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index c298ccc..396de05 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -154,7 +154,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
             else
             {
-                BytesRef bytes = field.BinaryValue();
+                BytesRef bytes = field.BinaryValue;
                 if (bytes != null)
                 {
                     Write(TYPE_BINARY);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Core/Codecs/Compressing/CompressingStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Compressing/CompressingStoredFieldsWriter.cs b/src/Lucene.Net.Core/Codecs/Compressing/CompressingStoredFieldsWriter.cs
index c234dbb..423a503 100644
--- a/src/Lucene.Net.Core/Codecs/Compressing/CompressingStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Compressing/CompressingStoredFieldsWriter.cs
@@ -316,7 +316,7 @@ namespace Lucene.Net.Codecs.Compressing
             }
             else
             {
-                bytes = field.BinaryValue();
+                bytes = field.BinaryValue;
                 if (bytes != null)
                 {
                     bits = BYTE_ARR;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
index 45eede8..0b9beb6 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
@@ -188,7 +188,7 @@ namespace Lucene.Net.Codecs.Lucene40
             }
             else
             {
-                bytes = field.BinaryValue();
+                bytes = field.BinaryValue;
                 if (bytes != null)
                 {
                     bits |= FIELD_IS_BINARY;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Core/Document/Document.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/Document.cs b/src/Lucene.Net.Core/Document/Document.cs
index a8e8348..30b8634 100644
--- a/src/Lucene.Net.Core/Document/Document.cs
+++ b/src/Lucene.Net.Core/Document/Document.cs
@@ -134,7 +134,7 @@ namespace Lucene.Net.Documents
             {
                 if (field.Name.Equals(name))
                 {
-                    BytesRef bytes = field.BinaryValue();
+                    BytesRef bytes = field.BinaryValue;
 
                     if (bytes != null)
                     {
@@ -160,7 +160,7 @@ namespace Lucene.Net.Documents
             {
                 if (field.Name.Equals(name))
                 {
-                    BytesRef bytes = field.BinaryValue();
+                    BytesRef bytes = field.BinaryValue;
                     if (bytes != null)
                     {
                         return bytes;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Core/Document/Field.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/Field.cs b/src/Lucene.Net.Core/Document/Field.cs
index 3e6f834..5e4ab2e 100644
--- a/src/Lucene.Net.Core/Document/Field.cs
+++ b/src/Lucene.Net.Core/Document/Field.cs
@@ -533,15 +533,18 @@ namespace Lucene.Net.Documents
             }
         }
 
-        public BytesRef BinaryValue()
+        public BytesRef BinaryValue
         {
-            if (FieldsData is BytesRef)
-            {
-                return (BytesRef)FieldsData;
-            }
-            else
+            get
             {
-                return null;
+                if (FieldsData is BytesRef)
+                {
+                    return (BytesRef)FieldsData;
+                }
+                else
+                {
+                    return null;
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Core/Index/DocValuesProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocValuesProcessor.cs b/src/Lucene.Net.Core/Index/DocValuesProcessor.cs
index ad4f011..6565856 100644
--- a/src/Lucene.Net.Core/Index/DocValuesProcessor.cs
+++ b/src/Lucene.Net.Core/Index/DocValuesProcessor.cs
@@ -59,15 +59,15 @@ namespace Lucene.Net.Index
                 fieldInfo.DocValuesType = dvType;
                 if (dvType == DocValuesType_e.BINARY)
                 {
-                    AddBinaryField(fieldInfo, docID, field.BinaryValue());
+                    AddBinaryField(fieldInfo, docID, field.BinaryValue);
                 }
                 else if (dvType == DocValuesType_e.SORTED)
                 {
-                    AddSortedField(fieldInfo, docID, field.BinaryValue());
+                    AddSortedField(fieldInfo, docID, field.BinaryValue);
                 }
                 else if (dvType == DocValuesType_e.SORTED_SET)
                 {
-                    AddSortedSetField(fieldInfo, docID, field.BinaryValue());
+                    AddSortedSetField(fieldInfo, docID, field.BinaryValue);
                 }
                 else if (dvType == DocValuesType_e.NUMERIC)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Core/Index/IndexableField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexableField.cs b/src/Lucene.Net.Core/Index/IndexableField.cs
index fbd6a85..aa2a16b 100644
--- a/src/Lucene.Net.Core/Index/IndexableField.cs
+++ b/src/Lucene.Net.Core/Index/IndexableField.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Index
 
         /// <summary>
         /// Non-null if this field has a binary value </summary>
-        BytesRef BinaryValue();
+        BytesRef BinaryValue { get; }
 
         /// <summary>
         /// Non-null if this field has a string value </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
index 6e36184..c85a0de 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
@@ -142,7 +142,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             else
             {
-                bytes = field.BinaryValue();
+                bytes = field.BinaryValue;
                 if (bytes != null)
                 {
                     bits |= Lucene3xStoredFieldsReader.FIELD_IS_BINARY;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index e3f8442..c97593c 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -240,11 +240,11 @@ namespace Lucene.Net.Index
 
             Document doc = new Document();
             Field f = new StoredField("binary", b, 10, 17);
-            var bx = f.BinaryValue().Bytes;
+            var bx = f.BinaryValue.Bytes;
             Assert.IsTrue(bx != null);
             Assert.AreEqual(50, bx.Length);
-            Assert.AreEqual(10, f.BinaryValue().Offset);
-            Assert.AreEqual(17, f.BinaryValue().Length);
+            Assert.AreEqual(10, f.BinaryValue.Offset);
+            Assert.AreEqual(17, f.BinaryValue.Length);
             doc.Add(f);
             w.AddDocument(doc);
             w.Dispose();
@@ -252,7 +252,7 @@ namespace Lucene.Net.Index
             IndexReader ir = DirectoryReader.Open(dir);
             Document doc2 = ir.Document(0);
             IndexableField f2 = doc2.GetField("binary");
-            b = f2.BinaryValue().Bytes;
+            b = f2.BinaryValue.Bytes;
             Assert.IsTrue(b != null);
             Assert.AreEqual(17, b.Length, 17);
             Assert.AreEqual(87, b[0]);
@@ -405,7 +405,7 @@ namespace Lucene.Net.Index
                 IndexableField sField = sDoc.GetField(fldName);
                 if (typeof(Field) == fld.GetType())
                 {
-                    Assert.AreEqual(fld.BinaryValue(), sField.BinaryValue());
+                    Assert.AreEqual(fld.BinaryValue, sField.BinaryValue);
                     Assert.AreEqual(fld.StringValue, sField.StringValue);
                 }
                 else
@@ -737,7 +737,7 @@ namespace Lucene.Net.Index
                 Assert.AreEqual(docs[i].GetFields("fld").Length, fieldValues.Length);
                 if (fieldValues.Length > 0)
                 {
-                    Assert.AreEqual(docs[i].GetFields("fld")[0].BinaryValue(), fieldValues[0].BinaryValue());
+                    Assert.AreEqual(docs[i].GetFields("fld")[0].BinaryValue, fieldValues[0].BinaryValue);
                 }
             }
             rd.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 63100f0..978ea45 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -2227,7 +2227,7 @@ namespace Lucene.Net.Util
         public void AssertStoredFieldEquals(string info, IndexableField leftField, IndexableField
rightField)
         {
             Assert.AreEqual(leftField.Name, rightField.Name, info);
-            Assert.AreEqual(leftField.BinaryValue(), rightField.BinaryValue(), info);
+            Assert.AreEqual(leftField.BinaryValue, rightField.BinaryValue, info);
             Assert.AreEqual(leftField.StringValue, rightField.StringValue, info);
             Assert.AreEqual(leftField.NumericValue, rightField.NumericValue, info);
             // TODO: should we check the FT at all?

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.TestFramework/Util/TestUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/TestUtil.cs b/src/Lucene.Net.TestFramework/Util/TestUtil.cs
index 89f690a..59386cf 100644
--- a/src/Lucene.Net.TestFramework/Util/TestUtil.cs
+++ b/src/Lucene.Net.TestFramework/Util/TestUtil.cs
@@ -1004,11 +1004,11 @@ namespace Lucene.Net.Util
                             break;
 
                         case DocValuesType_e.BINARY:
-                            field2 = new BinaryDocValuesField(field1.Name, field1.BinaryValue());
+                            field2 = new BinaryDocValuesField(field1.Name, field1.BinaryValue);
                             break;
 
                         case DocValuesType_e.SORTED:
-                            field2 = new SortedDocValuesField(field1.Name, field1.BinaryValue());
+                            field2 = new SortedDocValuesField(field1.Name, field1.BinaryValue);
                             break;
 
                         default:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Document/TestDocument.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Document/TestDocument.cs b/src/Lucene.Net.Tests/core/Document/TestDocument.cs
index c2700da..391f4ac 100644
--- a/src/Lucene.Net.Tests/core/Document/TestDocument.cs
+++ b/src/Lucene.Net.Tests/core/Document/TestDocument.cs
@@ -68,7 +68,7 @@ namespace Lucene.Net.Document
 
             Assert.AreEqual(2, doc.Fields.Count);
 
-            Assert.IsTrue(binaryFld.BinaryValue() != null);
+            Assert.IsTrue(binaryFld.BinaryValue != null);
             Assert.IsTrue(binaryFld.FieldType.Stored);
             Assert.IsFalse(binaryFld.FieldType.Indexed);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Document/TestField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Document/TestField.cs b/src/Lucene.Net.Tests/core/Document/TestField.cs
index ab1016f..cbe8ecd 100644
--- a/src/Lucene.Net.Tests/core/Document/TestField.cs
+++ b/src/Lucene.Net.Tests/core/Document/TestField.cs
@@ -211,7 +211,7 @@ namespace Lucene.Net.Document
             TrySetStringValue(field);
             TrySetTokenStreamValue(field);
 
-            Assert.AreEqual(new BytesRef("baz"), field.BinaryValue());
+            Assert.AreEqual(new BytesRef("baz"), field.BinaryValue);
         }
 
         [Test]
@@ -232,7 +232,7 @@ namespace Lucene.Net.Document
             TrySetStringValue(field);
             TrySetTokenStreamValue(field);
 
-            Assert.AreEqual(new BytesRef("baz"), field.BinaryValue());
+            Assert.AreEqual(new BytesRef("baz"), field.BinaryValue);
         }
 
         [Test]
@@ -332,7 +332,7 @@ namespace Lucene.Net.Document
                 TrySetStringValue(field);
                 TrySetTokenStreamValue(field);
 
-                Assert.AreEqual(new BytesRef("baz"), field.BinaryValue());
+                Assert.AreEqual(new BytesRef("baz"), field.BinaryValue);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs b/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
index 925995e..ade37a4 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
@@ -389,8 +389,8 @@ namespace Lucene.Net.Index
             Assert.IsNotNull(fields);
             Assert.AreEqual(1, fields.Length);
             IndexableField b1 = fields[0];
-            Assert.IsTrue(b1.BinaryValue() != null);
-            BytesRef bytesRef = b1.BinaryValue();
+            Assert.IsTrue(b1.BinaryValue != null);
+            BytesRef bytesRef = b1.BinaryValue;
             Assert.AreEqual(bin.Length, bytesRef.Length);
             for (int i = 0; i < bin.Length; i++)
             {
@@ -408,8 +408,8 @@ namespace Lucene.Net.Index
             Assert.IsNotNull(fields);
             Assert.AreEqual(1, fields.Length);
             b1 = fields[0];
-            Assert.IsTrue(b1.BinaryValue() != null);
-            bytesRef = b1.BinaryValue();
+            Assert.IsTrue(b1.BinaryValue != null);
+            bytesRef = b1.BinaryValue;
             Assert.AreEqual(bin.Length, bytesRef.Length);
             for (int i = 0; i < bin.Length; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
index 48332ac..3b7eafc 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
@@ -1508,14 +1508,14 @@ namespace Lucene.Net.Index
             IndexReader ir = DirectoryReader.Open(dir);
             Document doc2 = ir.Document(0);
             IndexableField f3 = doc2.GetField("binary");
-            b = f3.BinaryValue().Bytes;
+            b = f3.BinaryValue.Bytes;
             Assert.IsTrue(b != null);
             Assert.AreEqual(17, b.Length, 17);
             Assert.AreEqual(87, b[0]);
 
-            Assert.IsTrue(ir.Document(0).GetField("binary").BinaryValue() != null);
-            Assert.IsTrue(ir.Document(1).GetField("binary").BinaryValue() != null);
-            Assert.IsTrue(ir.Document(2).GetField("binary").BinaryValue() != null);
+            Assert.IsTrue(ir.Document(0).GetField("binary").BinaryValue != null);
+            Assert.IsTrue(ir.Document(1).GetField("binary").BinaryValue != null);
+            Assert.IsTrue(ir.Document(2).GetField("binary").BinaryValue != null);
 
             Assert.AreEqual("value", ir.Document(0).Get("string"));
             Assert.AreEqual("value", ir.Document(1).Get("string"));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
index cfc66b4..324a5e9 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
@@ -2019,9 +2019,9 @@ namespace Lucene.Net.Index
                 get { return 5f; }
             }
 
-            public BytesRef BinaryValue()
+            public BytesRef BinaryValue
             {
-                return null;
+                get { return null; }
             }
 
             public string StringValue

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs b/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
index 8790059..336437f 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
@@ -162,20 +162,23 @@ namespace Lucene.Net.Index
                 get { return 1.0f + (float)Random().NextDouble(); }
             }
 
-            public BytesRef BinaryValue()
+            public BytesRef BinaryValue
             {
-                if ((Counter % 10) == 3)
+                get
                 {
-                    var bytes = new byte[10];
-                    for (int idx = 0; idx < bytes.Length; idx++)
+                    if ((Counter % 10) == 3)
                     {
-                        bytes[idx] = (byte)(Counter + idx);
+                        var bytes = new byte[10];
+                        for (int idx = 0; idx < bytes.Length; idx++)
+                        {
+                            bytes[idx] = (byte)(Counter + idx);
+                        }
+                        return new BytesRef(bytes, 0, bytes.Length);
+                    }
+                    else
+                    {
+                        return null;
                     }
-                    return new BytesRef(bytes, 0, bytes.Length);
-                }
-                else
-                {
-                    return null;
                 }
             }
 
@@ -302,7 +305,7 @@ namespace Lucene.Net.Index
                         if (binary)
                         {
                             Assert.IsNotNull(f, "doc " + id + " doesn't have field f" + counter);
-                            BytesRef b = f.BinaryValue();
+                            BytesRef b = f.BinaryValue;
                             Assert.IsNotNull(b);
                             Assert.AreEqual(10, b.Length);
                             for (int idx = 0; idx < 10; idx++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf2396b9/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs b/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
index 2720c7f..7881cf1 100644
--- a/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
@@ -681,9 +681,9 @@ namespace Lucene.Net.Index
             {
                 IndexableField f1 = ff1[i];
                 IndexableField f2 = ff2[i];
-                if (f1.BinaryValue() != null)
+                if (f1.BinaryValue != null)
                 {
-                    Debug.Assert(f2.BinaryValue() != null);
+                    Debug.Assert(f2.BinaryValue != null);
                 }
                 else
                 {


Mime
View raw message