You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In WordNetWrapper.initline 72 we check for the WORDNET_HOME environment variable: !System.getenv("WORDNET_HOME").isEmpty() && !System.getenv("WORDNET_HOME").isBlank().
However, if no environment variable is set, System.getenv("WORDNET_HOME") returns null. Consequently, !System.getenv("WORDNET_HOME").isEmpty() throws a NPE.
Problem
In
WordNetWrapper.init
line 72 we check for theWORDNET_HOME
environment variable:!System.getenv("WORDNET_HOME").isEmpty() && !System.getenv("WORDNET_HOME").isBlank()
.However, if no environment variable is set,
System.getenv("WORDNET_HOME")
returnsnull
. Consequently,!System.getenv("WORDNET_HOME").isEmpty()
throws a NPE.Solution
StringUtils.isNotEmpty(System.getenv("WORDNET_HOME"));
The text was updated successfully, but these errors were encountered: