You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by "rzo1 (via GitHub)" <gi...@apache.org> on 2026/10/04 17:01:57 UTC

[I] (fix) opennlp-api public methods throw NullPointerException for null arguments instead of IllegalArgumentException (opennlp)

rzo1 opened a new issue, #1395:
URL: https://github.com/apache/opennlp/issues/1395

   Several public opennlp-api entry points document `IllegalArgumentException` for null arguments, or follow the module convention, but throw `NullPointerException` from `Objects.requireNonNull` or from an unguarded dereference. Examples are `DocumentAnnotators.forEachSentence`, the `AlignedText` record (no compact constructor, so invalid components fail later), `Alignment.andThen` and `CodePointSet.fromFile`, `union` and `of(int...)`.
   
   They should validate through `ArgumentChecks.requireNonNullArg` and document `@throws IllegalArgumentException`. This changes the exception type callers see, so it belongs in the 3.0.0 release notes.


-- 
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: commits-unsubscribe@opennlp.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] opennlp-api public methods throw NullPointerException for null arguments instead of IllegalArgumentException (opennlp)

Posted by "mawiesne (via GitHub)" <gi...@apache.org>.
mawiesne closed issue #1395: opennlp-api public methods throw NullPointerException for null arguments instead of IllegalArgumentException
URL: https://github.com/apache/opennlp/issues/1395


-- 
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: commits-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org