[
https://issues.apache.org/jira/browse/OPENNLP-1916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Wiesner updated OPENNLP-1916:
------------------------------------
Summary: Improve Normalizer documentation and fail loud on chain (was:
Minor: Normalizer documentation and fail loud on chain)
> Improve Normalizer documentation and fail loud on chain
> -------------------------------------------------------
>
> Key: OPENNLP-1916
> URL: https://issues.apache.org/jira/browse/OPENNLP-1916
> Project: OpenNLP
> Issue Type: Improvement
> Reporter: Kristian Rickert
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 1. Minor: Replace the rung metaphor with "normalizer" wording.
> 2. Minor:
> Validate and copy the aggregate normalizer chain at construction:
> AggregateCharSequenceNormalizer stored the caller's varargs array as-is (null
> array or null element caused NPE mid-normalize, which cascaded into a changed
> aggregate).
>
> I changed it to fail loudly.
>
> Now throws IllegalArgumentException on null, defensive copy, shadow gone,
> constructor javadoc added, plus a new 4-test
> AggregateCharSequenceNormalizerTest covering order, both null rejections, and
> array-mutation isolation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)