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/05 17:30:46 UTC

[PR] GH-1395: Reject null arguments in opennlp-api with IllegalArgumentException (opennlp)

rzo1 opened a new pull request, #1410:
URL: https://github.com/apache/opennlp/pull/1410

   Documented non-null arguments at the public boundaries of opennlp-api are now checked with ParamChecks, so they fail with IllegalArgumentException instead of NullPointerException. This covers the sample types, DocumentAnnotators, Alignment, CodePointSet, ObjectStreamUtils.concatenateObjectStream and a validating AlignedText record, and pinning tests are added for the reject side. NullPointerException is kept for internal invariant checks and for equals/compareTo contracts.
   
   Fixes #1395.
   
   Stacked on the ParamChecks rename (#1408); the base switches to main once that PR is merged.


-- 
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


Re: [PR] GH-1395: Reject null arguments in opennlp-api with IllegalArgumentException (opennlp)

Posted by "mawiesne (via GitHub)" <gi...@apache.org>.
mawiesne merged PR #1410:
URL: https://github.com/apache/opennlp/pull/1410


-- 
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


Re: [PR] GH-1395: Reject null arguments in opennlp-api with IllegalArgumentException (opennlp)

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1410:
URL: https://github.com/apache/opennlp/pull/1410#issuecomment-6022313934

   Thx for review. Mentioned the AlignedText length check in the description.


-- 
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