Open StrongestNumber9 opened 3 months ago
Description
Replace getBytes("UTF-8") with getBytes(StandardCharsets.UTF_8)
Use case or motivation behind the feature request
It doesn't throw when using well defined StandardCharsets -> no need to do try/catch for something that we know is not going to throw
Related issues
Additional context
No: relpBatch.insert(syslogMessage.toRfc5424SyslogMessage().getBytes("UTF-8")); Yes: relpBatch.insert(syslogMessage.toRfc5424SyslogMessage().getBytes(StandardCharsets.UTF_8));
relpBatch.insert(syslogMessage.toRfc5424SyslogMessage().getBytes("UTF-8"));
relpBatch.insert(syslogMessage.toRfc5424SyslogMessage().getBytes(StandardCharsets.UTF_8));
I think this should be done together with #37
Description
Replace getBytes("UTF-8") with getBytes(StandardCharsets.UTF_8)
Use case or motivation behind the feature request
It doesn't throw when using well defined StandardCharsets -> no need to do try/catch for something that we know is not going to throw
Related issues
Additional context
No:
relpBatch.insert(syslogMessage.toRfc5424SyslogMessage().getBytes("UTF-8"));
Yes:relpBatch.insert(syslogMessage.toRfc5424SyslogMessage().getBytes(StandardCharsets.UTF_8));