mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
fixed bug
Former-commit-id: 94c67d4289b5766c3d184cddfc8231efec645764
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