예제 #1
0
 public object Create(Random random)
 {
     // TODO: make nastier
     try
     {
         using (Stream @is = typeof(TestCompoundWordTokenFilter).getResourceAsStream("da_UTF8.xml"))
         {
             HyphenationTree hyphenator = HyphenationCompoundWordTokenFilter.GetHyphenationTree(@is);
             return(hyphenator);
         }
     }
     catch (Exception ex)
     {
         throw ex;
         return(null); // unreachable code
     }
 }
예제 #2
0
            public object Create(Random random)
            {
                // TODO: make nastier
                try
                {
                    using Stream @is = typeof(TestCompoundWordTokenFilter).getResourceAsStream("da_UTF8.xml");
                    HyphenationTree hyphenator = HyphenationCompoundWordTokenFilter.GetHyphenationTree(@is);
                    return(hyphenator);
                }
                catch (Exception /*ex*/)
                {
                    throw;        // LUCENENET: CA2200: Rethrow to preserve stack details (https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2200-rethrow-to-preserve-stack-details)
#pragma warning disable 162
                    return(null); // unreachable code

#pragma warning restore 162
                }
            }