krickert commented on code in PR #1151:
URL: https://github.com/apache/opennlp/pull/1151#discussion_r3564859220


##########
opennlp-api/src/main/java/opennlp/tools/util/normalizer/CharSequenceNormalizer.java:
##########
@@ -29,8 +29,11 @@ public interface CharSequenceNormalizer extends Serializable 
{
   /**
    * Normalizes a sequence of characters.
    *
-   * @param text The {@link CharSequence} to normalize.
+   * @param text The {@link CharSequence} to normalize. Must not be {@code 
null}.
    * @return The normalized {@link CharSequence}.
+   * @throws IllegalArgumentException Thrown if {@code text} is {@code null}. 
Implementations

Review Comment:
   Aligned the whole package: every implementation now throws 
`IllegalArgumentException` on `null`, with a parameterized contract test over 
all of them. Note one behavior change: the spellcheck normalizer previously 
returned `null` on `null` input; it now throws like the rest.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to