Skip to content

Commit be57ebf

Browse files
committed
OPENNLP-1880: Align null contracts, annotations, and dev helper placement with the review conventions
1 parent c4174f0 commit be57ebf

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

opennlp-extensions/opennlp-wordnet/src/main/java/opennlp/wordnet/MorphyLemmatizer.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ public MorphyLemmatizer(LexicalKnowledgeBase lexicon, MorphyExceptions exception
100100
*/
101101
@Override
102102
public String[] lemmatize(String[] toks, String[] tags) {
103-
if (toks == null || tags == null) {
104-
throw new IllegalArgumentException("Toks and tags must not be null");
103+
if (toks == null) {
104+
throw new IllegalArgumentException("Toks must not be null");
105+
}
106+
if (tags == null) {
107+
throw new IllegalArgumentException("Tags must not be null");
105108
}
106109
if (toks.length != tags.length) {
107110
throw new IllegalArgumentException("Toks and tags must have the same length, got "
@@ -123,8 +126,11 @@ public String[] lemmatize(String[] toks, String[] tags) {
123126
*/
124127
@Override
125128
public List<List<String>> lemmatize(List<String> toks, List<String> tags) {
126-
if (toks == null || tags == null) {
127-
throw new IllegalArgumentException("Toks and tags must not be null");
129+
if (toks == null) {
130+
throw new IllegalArgumentException("Toks must not be null");
131+
}
132+
if (tags == null) {
133+
throw new IllegalArgumentException("Tags must not be null");
128134
}
129135
if (toks.size() != tags.size()) {
130136
throw new IllegalArgumentException("Toks and tags must have the same size, got "

0 commit comments

Comments
 (0)