Consistently use tabs rather than spaces
Update code that has accidentally used spaces instead of tabs. Also remove all trailing whitespace. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
be85bd8e09
commit
5cedd0d5d4
@@ -180,8 +180,8 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
|
||||
|
||||
private int getPort(URI uri) {
|
||||
if (uri.getPort() == -1) {
|
||||
String scheme = uri.getScheme().toLowerCase(Locale.ENGLISH);
|
||||
return ("wss".equals(scheme) ? 443 : 80);
|
||||
String scheme = uri.getScheme().toLowerCase(Locale.ENGLISH);
|
||||
return ("wss".equals(scheme) ? 443 : 80);
|
||||
}
|
||||
return uri.getPort();
|
||||
}
|
||||
|
||||
@@ -422,17 +422,17 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
|
||||
Assert.state(getTaskScheduler() != null, "No TaskScheduler configured");
|
||||
this.lastWriteTime = System.currentTimeMillis();
|
||||
this.inactivityTasks.add(getTaskScheduler().scheduleWithFixedDelay(() -> {
|
||||
if (System.currentTimeMillis() - this.lastWriteTime > duration) {
|
||||
try {
|
||||
runnable.run();
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("WriteInactivityTask failure", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, duration / 2));
|
||||
if (System.currentTimeMillis() - this.lastWriteTime > duration) {
|
||||
try {
|
||||
runnable.run();
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("WriteInactivityTask failure", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, duration / 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -118,12 +118,12 @@ public class JettyRequestUpgradeStrategy implements RequestUpgradeStrategy, Serv
|
||||
this.factory = new WebSocketServerFactory(this.servletContext, this.policy);
|
||||
}
|
||||
this.factory.setCreator((request, response) -> {
|
||||
WebSocketHandlerContainer container = containerHolder.get();
|
||||
Assert.state(container != null, "Expected WebSocketHandlerContainer");
|
||||
response.setAcceptedSubProtocol(container.getSelectedProtocol());
|
||||
response.setExtensions(container.getExtensionConfigs());
|
||||
return container.getHandler();
|
||||
});
|
||||
WebSocketHandlerContainer container = containerHolder.get();
|
||||
Assert.state(container != null, "Expected WebSocketHandlerContainer");
|
||||
response.setAcceptedSubProtocol(container.getSelectedProtocol());
|
||||
response.setExtensions(container.getExtensionConfigs());
|
||||
return container.getHandler();
|
||||
});
|
||||
this.factory.start();
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,9 +37,9 @@ public abstract class AbstractSockJsMessageCodec implements SockJsMessageCodec {
|
||||
char[] quotedChars = applyJsonQuoting(messages[i]);
|
||||
sb.append(escapeSockJsSpecialChars(quotedChars));
|
||||
sb.append('"');
|
||||
if (i < messages.length - 1) {
|
||||
sb.append(',');
|
||||
}
|
||||
if (i < messages.length - 1) {
|
||||
sb.append(',');
|
||||
}
|
||||
}
|
||||
sb.append(']');
|
||||
return sb.toString();
|
||||
|
||||
@@ -576,21 +576,21 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
|
||||
|
||||
private static final String IFRAME_CONTENT =
|
||||
"<!DOCTYPE html>\n" +
|
||||
"<html>\n" +
|
||||
"<head>\n" +
|
||||
" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n" +
|
||||
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
|
||||
" <script>\n" +
|
||||
" document.domain = document.domain;\n" +
|
||||
" _sockjs_onload = function(){SockJS.bootstrap_iframe();};\n" +
|
||||
" </script>\n" +
|
||||
" <script src=\"%s\"></script>\n" +
|
||||
"</head>\n" +
|
||||
"<body>\n" +
|
||||
" <h2>Don't panic!</h2>\n" +
|
||||
" <p>This is a SockJS hidden iframe. It's used for cross domain magic.</p>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
"<html>\n" +
|
||||
"<head>\n" +
|
||||
" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n" +
|
||||
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
|
||||
" <script>\n" +
|
||||
" document.domain = document.domain;\n" +
|
||||
" _sockjs_onload = function(){SockJS.bootstrap_iframe();};\n" +
|
||||
" </script>\n" +
|
||||
" <script src=\"%s\"></script>\n" +
|
||||
"</head>\n" +
|
||||
"<body>\n" +
|
||||
" <h2>Don't panic!</h2>\n" +
|
||||
" <p>This is a SockJS hidden iframe. It's used for cross domain magic.</p>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
|
||||
@Override
|
||||
public void handle(ServerHttpRequest request, ServerHttpResponse response) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user