Skip to content

Commit

Permalink
SWEEP: Reviewed all catch blocks where Lucene uses MissingResourceExc…
Browse files Browse the repository at this point in the history
…eption and converted them to use our IsMissingResourceException() extension method (see apache#446).
  • Loading branch information
NightOwl888 committed Apr 14, 2021
1 parent cc4a313 commit 1ba90a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Lucene.Net.QueryParser/Flexible/Messages/NLS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ private static string GetResourceBundleObject(string messageKey, CultureInfo loc
if (obj != null)
return obj;
}
#pragma warning disable 168
catch (MissingManifestResourceException e)
#pragma warning restore 168
catch (Exception e) when (e.IsMissingResourceException())
{
// just continue it might be on the next resource bundle
}
Expand Down Expand Up @@ -209,7 +207,7 @@ private static void ValidateMessage(string key, Type clazz)
}
}
}
catch (MissingManifestResourceException) // LUCENENET: IDE0059: Remove unnecessary value assignment
catch (Exception e) when (e.IsMissingResourceException())
{
//System.err.println("WARN: Message with key:" + key + " and locale: "
// + Locale.getDefault() + " not found.");
Expand Down

0 comments on commit 1ba90a8

Please sign in to comment.