Polish contribution

See gh-24805
This commit is contained in:
Sam Brannen
2020-03-30 13:42:51 +02:00
parent e63d1cf12d
commit 9e30620ac2
8 changed files with 42 additions and 40 deletions

View File

@@ -248,7 +248,7 @@ public class JettyXhrTransport extends AbstractXhrTransport implements Lifecycle
}
private void handleFrame() {
String content = StreamUtils.baosToString(this.outputStream, SockJsFrame.CHARSET);
String content = StreamUtils.copyToString(this.outputStream, SockJsFrame.CHARSET);
this.outputStream.reset();
if (logger.isTraceEnabled()) {
logger.trace("XHR content received: " + content);

View File

@@ -38,7 +38,6 @@ import io.undertow.util.HeaderMap;
import io.undertow.util.HttpString;
import io.undertow.util.Methods;
import io.undertow.util.StringReadChannelListener;
import org.springframework.util.StreamUtils;
import org.xnio.ChannelListener;
import org.xnio.ChannelListeners;
import org.xnio.IoUtils;
@@ -54,6 +53,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StreamUtils;
import org.springframework.util.StringUtils;
import org.springframework.util.concurrent.SettableListenableFuture;
import org.springframework.web.client.HttpServerErrorException;
@@ -439,7 +439,7 @@ public class UndertowXhrTransport extends AbstractXhrTransport {
}
private void handleFrame() {
String content = StreamUtils.baosToString(this.outputStream, SockJsFrame.CHARSET);
String content = StreamUtils.copyToString(this.outputStream, SockJsFrame.CHARSET);
this.outputStream.reset();
if (logger.isTraceEnabled()) {
logger.trace("XHR content received: " + content);