You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/25 03:44:34 UTC
[50/50] [abbrv] lucenenet git commit: Lucene.Net.Core.Util.BytesRef:
Removed validation on setting Bytes property to non-null because some tests
actually set it to null
Lucene.Net.Core.Util.BytesRef: Removed validation on setting Bytes property to non-null because some tests actually set it to null
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2315d0d4
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2315d0d4
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2315d0d4
Branch: refs/heads/api-work
Commit: 2315d0d410b6196109d1634396ee8c0d7a766a3f
Parents: 5d8d81a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Jan 25 10:09:05 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Jan 25 10:09:05 2017 +0700
----------------------------------------------------------------------
src/Lucene.Net.Core/Util/BytesRef.cs | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2315d0d4/src/Lucene.Net.Core/Util/BytesRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/BytesRef.cs b/src/Lucene.Net.Core/Util/BytesRef.cs
index c50cbe9..ee1a704 100644
--- a/src/Lucene.Net.Core/Util/BytesRef.cs
+++ b/src/Lucene.Net.Core/Util/BytesRef.cs
@@ -48,14 +48,7 @@ namespace Lucene.Net.Util
public byte[] Bytes
{
get { return bytes; }
- set
- {
- if (value == null)
- {
- throw new ArgumentNullException("bytes may never be set to null");
- }
- bytes = value;
- }
+ set { bytes = value; } // LUCENENET NOTE: Although the comments state this cannot be null, some of the tests depend on setting it to null!
}
private byte[] bytes;