You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2026/09/17 19:17:00 UTC
[jira] [Updated] (OPENNLP-1932) RegEx removal part 4: wildcard matching in the model resolver
[ https://issues.apache.org/jira/browse/OPENNLP-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Zowalla updated OPENNLP-1932:
-------------------------------------
Fix Version/s: 3.0.0
> RegEx removal part 4: wildcard matching in the model resolver
> -------------------------------------------------------------
>
> Key: OPENNLP-1932
> URL: https://issues.apache.org/jira/browse/OPENNLP-1932
> Project: OpenNLP
> Issue Type: Improvement
> Reporter: Kristian Rickert
> Assignee: Kristian Rickert
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {{AbstractClassPathModelFinder}}, {{DirectoryModelFinder}}, and {{SimpleClassPathModelFinder}} converted wildcard strings to regular expressions and split the class path with compiled patterns. A package-private {{GlobMatcher}} now matches {{*}} (any run) and {{?}} (one code point) directly, anchored on the whole name and, as before, not crossing line terminators; the class path split is a character scan with {{String.split}} semantics.
> One behavior change, intended: characters the old conversion never quoted ({{( ) [ ] { } + | ^ $ \}}) had regex meaning or threw {{PatternSyntaxException}}; they are literal now.
> API: the protected {{asRegex}} and {{matchesPattern(URL, Pattern)}} on the public abstract {{AbstractClassPathModelFinder}} are replaced by protected {{matchesWildcard(URL, String)}}. No code in the repository used them; this is a 3.0 change.
> Verification: 39 globs by 46 inputs plus a 300,000-pair fuzz compared with the old regex path; all differences come from the unquoted characters above. {{GlobMatcherTest}} adds 64 cases and the module gains its first {{DirectoryModelFinderTest}}. The module pom adds the managed {{junit-jupiter-params}} dependency.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)