You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by mh...@apache.org on 2013/09/24 20:33:25 UTC
[49/50] [abbrv] git commit: fixed fst build errors
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 <jm...@gmail.com>
Authored: Tue Aug 13 16:15:50 2013 -0400
Committer: Paul Irwin <pa...@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)