mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
fixed bug
Former-commit-id: a9d2e22c806dc3bbd694f3d5f57d7aa11371fe44
This commit is contained in:
@@ -59,7 +59,13 @@ 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());
|
||||
analyzeVersion(version);
|
||||
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