mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-04-01 22:53:34 +02:00
fixed bug
Former-commit-id: a9d2e22c806dc3bbd694f3d5f57d7aa11371fe44
This commit is contained in:
@@ -59,8 +59,14 @@ public final class VersionTokenizingFilter extends TokenFilter {
|
||||
public boolean incrementToken() throws IOException {
|
||||
if (tokens.size() == 0 && input.incrementToken()) {
|
||||
String version = new String(termAtt.buffer(), 0, termAtt.length());
|
||||
String[] toAnalyze = version.split("[_-]");
|
||||
if (toAnalyze.length > 1) { //ensure we analyze the whole string as one too
|
||||
analyzeVersion(version);
|
||||
}
|
||||
for (String str : toAnalyze) {
|
||||
analyzeVersion(version);
|
||||
}
|
||||
}
|
||||
return addTerm();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user