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 2022/10/14 14:30:23 UTC

[lucenenet] branch master updated: fix: Fixed throw statement in BinaryDictionary

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c3ccb0ad fix: Fixed throw statement in BinaryDictionary
9c3ccb0ad is described below

commit 9c3ccb0ad439922ba6952ee487712b708d23b2af
Author: Nikolaj Brask-Nielsen <ni...@gmail.com>
AuthorDate: Fri Oct 14 09:49:40 2022 +0200

    fix: Fixed throw statement in BinaryDictionary
    
    The string.Format statement would result in the following exception:
    
    ```
    Unhandled exception. System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
       at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
       at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
       at System.String.Format(String format, Object arg0, Object arg1, Object arg2)
    ```
---
 src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs b/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs
index f59b14741..d18f3535c 100644
--- a/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs
+++ b/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs
@@ -199,7 +199,7 @@ namespace Lucene.Net.Analysis.Ja.Dict
             {
                 throw new FileNotFoundException(string.Format("Expected file '{0}' not found. " +
                     "If the '{1}' directory exists, this file is required. " +
-                    "Either remove the '{3}' directory or generate the required dictionary files using the lucene-cli tool.",
+                    "Either remove the '{2}' directory or generate the required dictionary files using the lucene-cli tool.",
                     fileName, DATA_DIR, DATA_SUBDIR));
             }