lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [49/50] [abbrv] git commit: fixed fst build errors
Date Tue, 24 Sep 2013 18:33:25 GMT
fixed fst build errors


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

Branch: refs/heads/branch_4x
Commit: 07f83ff1c516fddcf14fcacf4704a20251571e75
Parents: b7ca14a
Author: James Blair <jmblair7@gmail.com>
Authored: Tue Aug 13 16:15:50 2013 -0400
Committer: Paul Irwin <paulirwin@gmail.com>
Committed: Tue Aug 13 16:18:13 2013 -0400

----------------------------------------------------------------------
 src/core/Util/Fst/FST.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/07f83ff1/src/core/Util/Fst/FST.cs
----------------------------------------------------------------------
diff --git a/src/core/Util/Fst/FST.cs b/src/core/Util/Fst/FST.cs
index 70f4e8e..145af95 100644
--- a/src/core/Util/Fst/FST.cs
+++ b/src/core/Util/Fst/FST.cs
@@ -352,7 +352,7 @@ namespace Lucene.Net.Util.Fst
         public void Save(FileInfo fileInfo)
         {
             var success = false;
-            var bs = new BufferedStream(new FileStream(fileInfo.FullName));
+            var bs = new BufferedStream(fileInfo.OpenWrite());
             try
             {
                 Save(new OutputStreamDataOutput(bs));
@@ -374,9 +374,9 @@ namespace Lucene.Net.Util.Fst
         /// <param name="fileInfo"></param>
         /// <param name="outputs"></param>
         /// <returns></returns>
-        public static FST<TMethod> Read<TMethod>(FileStream fileInfo, Outputs<TMethod>
outputs) where TMethod : class
+        public static FST<TMethod> Read<TMethod>(FileInfo fileInfo, Outputs<TMethod>
outputs) where TMethod : class
         {
-            var bs = new BufferedStream(new FileStream(fileInfo));
+            var bs = new BufferedStream(fileInfo.OpenRead());
             var success = false;
             try
             {
@@ -856,7 +856,7 @@ namespace Lucene.Net.Util.Fst
         /// <returns></returns>
         public int ReadNextArcLabel(Arc<T> arc, FST.BytesReader input)
         {
-            if (arc.IsLast)
+            if (arc.IsLast())
                 throw new ArgumentException("cannot readNextArc when arc.isLast()=true");
 
             if (arc.Label == END_LABEL)


Mime
View raw message