teragrep / cfe_16

HTTP Event Capture to Syslog bridge
GNU Affero General Public License v3.0
1 stars 3 forks source link

Replace getBytes("UTF-8") with getBytes(StandardCharsets.UTF_8) #33

Open StrongestNumber9 opened 3 months ago

StrongestNumber9 commented 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));

StrongestNumber9 commented 3 months ago

I think this should be done together with #37