krickert commented on PR #1108: URL: https://github.com/apache/opennlp/pull/1108#issuecomment-4802753865
@rzo1 Thanks — points 1 and 3 are fixed (commit `124d8526`); point 2 I'd like to leave as-is, reasoning below. **Exception-type symmetry.** `Confusables.parse` now throws `IllegalArgumentException` for malformed bundled data (both the truncated-mapping line and the bad-hex token), matching `CodePointSet.parse`/`fromFile`, which already raise `IllegalArgumentException` for the analogous "Malformed … on line" / "Invalid hex code point" cases. Updated `ConfusablesLoadTest` to expect it. **`opennlp-api/pom.xml` trailing newline.** Added. **Retry-after-failure path untested.** The bundled `confusables.txt` is always present, so the only way the load can fail (and thus the only way to exercise the retry) is a transient classloader/container fault that a unit test can't faithfully reproduce without adding a fault-injection seam to production code. I'd rather not widen the production surface purely to test an unreproducible path; the malformed-data branch it would funnel through *is* covered by `ConfusablesLoadTest`. Are you ok if we leave it? I wouldn't mind a testing round to see how it lands. -- 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]
