66using System . Reflection ;
77using System . Text ;
88
9+ #nullable enable
10+
911namespace Lucene . Net . Analysis . Util
1012{
1113 /*
@@ -52,7 +54,7 @@ public abstract class StopwordAnalyzerBase : Analyzer
5254 /// the Lucene version for cross version compatibility </param>
5355 /// <param name="stopwords">
5456 /// the analyzer's stopword set </param>
55- protected StopwordAnalyzerBase ( LuceneVersion version , CharArraySet stopwords )
57+ protected StopwordAnalyzerBase ( LuceneVersion version , CharArraySet ? stopwords )
5658 {
5759 m_matchVersion = version ;
5860 // analyzers should use char array set for stopwords!
@@ -88,7 +90,7 @@ protected StopwordAnalyzerBase(LuceneVersion version)
8890 /// if loading the stopwords throws an <see cref="IOException"/> </exception>
8991 protected static CharArraySet LoadStopwordSet ( bool ignoreCase , Type aClass , string resource , string comment )
9092 {
91- TextReader reader = null ;
93+ TextReader ? reader = null ;
9294 try
9395 {
9496 var resourceStream = aClass . FindAndGetManifestResourceStream ( resource ) ;
@@ -121,7 +123,7 @@ protected static CharArraySet LoadStopwordSet(bool ignoreCase, Type aClass, stri
121123 /// </remarks>
122124 protected static CharArraySet LoadStopwordSet ( string stopwordsFileName , LuceneVersion matchVersion )
123125 {
124- TextReader reader = null ;
126+ TextReader ? reader = null ;
125127 try
126128 {
127129 reader = IOUtils . GetDecodingReader ( stopwordsFileName , Encoding . UTF8 ) ;
@@ -147,7 +149,7 @@ protected static CharArraySet LoadStopwordSet(string stopwordsFileName, LuceneVe
147149 /// if loading the stopwords throws an <see cref="IOException"/> </exception>
148150 protected static CharArraySet LoadStopwordSet ( FileInfo stopwords , LuceneVersion matchVersion )
149151 {
150- TextReader reader = null ;
152+ TextReader ? reader = null ;
151153 try
152154 {
153155 reader = IOUtils . GetDecodingReader ( stopwords , Encoding . UTF8 ) ;
0 commit comments