DetectionStrategy conditional always true
Java library that ease the task to use streams.
Brought to you by:
gcontini
In the class DetectionStrategy, the conditional
if (recursionLevel == 0 || !FormatEnum.UNKNOWN.equals(curFormat)) { … }
always evalutes to true due the lack of ".format" for curFormat, so the expression becomes "anything OR NOT false", "anything OR true", "true".
Since it has been like that since it has been introduced (revision 303) I'd suggest not to correct it, but to remove it.
For example, if you try to recognize a base64-ed unrecognizable file it would be better to have
[[BASE64], [UNKNOWN]]
while if you correct it you'd only have
[[BASE64]]