krickert commented on code in PR #1150:
URL: https://github.com/apache/opennlp/pull/1150#discussion_r3593812138
##########
opennlp-extensions/opennlp-spellcheck/src/main/java/opennlp/spellcheck/normalizer/SpellCheckingCharSequenceNormalizer.java:
##########
@@ -133,11 +135,14 @@ public SpellCheckingCharSequenceNormalizer(SpellChecker
spellChecker) {
* @param model the loaded model whose engine is used; must not be {@code
null}
*/
public SpellCheckingCharSequenceNormalizer(SymSpellModel model) {
- this(Objects.requireNonNull(model, "model must not be
null").getSymSpell());
+ this(builder(model));
}
private SpellCheckingCharSequenceNormalizer(Builder b) {
Review Comment:
That constructor is `private` and only reached through the public
builders/ctors, so I put the `@throws IllegalArgumentException` docs on those
public entry points instead of the private one. Style preference - should I put
a one-liner on the private ctor too if you still want it?
--
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]