File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
src/main/java/com/cloudbees/syslog Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 1818import javax .annotation .Nonnull ;
1919import javax .annotation .Nullable ;
2020
21- import java .io .ByteArrayOutputStream ;
2221import java .io .CharArrayWriter ;
2322import java .io .IOException ;
2423import java .io .StringWriter ;
@@ -301,9 +300,7 @@ public String toRfc5425SyslogMessage() {
301300 */
302301 public void toRfc5425SyslogMessage (Writer out ) throws IOException {
303302
304- StringWriter sw = new StringWriter (msg == null ? 32 : msg .size () + 32 );
305- toRfc5424SyslogMessage (sw );
306- String rfc5424Message = sw .toString ();
303+ String rfc5424Message = toRfc5424SyslogMessage ();
307304 int length = rfc5424Message .getBytes (StandardCharsets .UTF_8 ).length ;
308305 out .write (String .valueOf (length ));
309306 out .write (SP );
You can’t perform that action at this time.
0 commit comments