Fix new Sonar smells

This commit is contained in:
Artem Bilan
2020-08-21 11:37:43 -04:00
parent 973276fc0a
commit 3fb6567a1f
3 changed files with 47 additions and 32 deletions

View File

@@ -120,7 +120,7 @@ public class RFC5424SyslogParser {
catch (IllegalStateException | StringIndexOutOfBoundsException ex) {
map.put(SyslogHeaders.DECODE_ERRORS, "true");
map.put(SyslogHeaders.ERRORS,
(ex instanceof StringIndexOutOfBoundsException ? "Unexpected end of message: " : "")
(ex instanceof StringIndexOutOfBoundsException ? "Unexpected end of message: " : "") // NOSONAR
+ ex.getMessage());
map.put(SyslogHeaders.UNDECODED, line);
}