Closed renierr closed 8 years ago
The Pattern is correct. It seams, that in my case the Line: assert matcher.matches(); is not evaluated cause of assert- have to check for Java Options, cause i did not set anything.
If i write a small programm and remove assert it worked. Proposal to remove the assert and use an if
Its possible to enable assertion only for this package, via Java Option:
-ea:xyz.capybara.clamav...
But i would prefere to not set this and do not force someone to enable asserts. Create a variable with the command and use the variable in the assert block or remove it with a check.
calling group on matcher without calling matches() or any find on the matcher lead to an IllegalStateException. In other words, if you not enable asserts you always get a IllegalStateException.
Sorry for the late answer, I was on holiday during the past two weeks. I'm gonna look into it and I'll reply to you by then.
thx for the fix. Is there a release build planned? I guess there will be not much changes in the future.
Version 1.0.3 with the fix has been released :)
The Result looks something like this: "stream: Eicar-Test-Signature FOUND"
The Pattern searches for a "filePath" Group but has none and throw a IllegalStateException -> Not Found Exception.
Pattern:
(.+: )?(?<filePath>.+): (?<virus>.+) FOUND$
Code Line: return new VirusInfo(matcher.group("filePath"), matcher.group("virus"));
ClamAv Version: 0.99