lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [07/15] lucenenet git commit: Lucene.Net.QueryParser.Flexible.Messages.Message.GetArguments() refactor: Changed return to clone the array so it cannot be changed from outside of the class.
Date Wed, 01 Feb 2017 05:19:06 GMT
Lucene.Net.QueryParser.Flexible.Messages.Message.GetArguments() refactor: Changed return to
clone the array so it cannot be changed from outside of the class.


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

Branch: refs/heads/api-work
Commit: 3321ce0803dbb908968ffaa5698cc75e1b3119bb
Parents: 48d6cd5
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 1 10:06:28 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 1 10:06:28 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3321ce08/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
index c99a247..24d0d0c 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
@@ -44,7 +44,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
 
         public virtual object[] GetArguments()
         {
-            return this.arguments;
+            return (object[])this.arguments.Clone(); // LUCENENET specific: These are obviously
not meant to be written to, so cloning the result
         }
 
         public virtual string Key


Mime
View raw message