Merge branch '5.1.x'

This commit is contained in:
Juergen Hoeller
2019-05-03 18:13:12 +02:00
20 changed files with 73 additions and 68 deletions

View File

@@ -429,7 +429,7 @@ public class SubProtocolWebSocketHandler
}
SubProtocolHandler handler;
if (!StringUtils.isEmpty(protocol)) {
if (StringUtils.hasLength(protocol)) {
handler = this.protocolHandlerLookup.get(protocol);
if (handler == null) {
throw new IllegalStateException(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -118,7 +118,7 @@ public abstract class AbstractHttpSendingTransportHandler extends AbstractTransp
String query = request.getURI().getQuery();
MultiValueMap<String, String> params = UriComponentsBuilder.newInstance().query(query).build().getQueryParams();
String value = params.getFirst("c");
if (StringUtils.isEmpty(value)) {
if (!StringUtils.hasLength(value)) {
return null;
}
String result = UriUtils.decode(value, StandardCharsets.UTF_8);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@@ -179,7 +179,7 @@ public class WebSocketServerSockJsSession extends AbstractSockJsSession implemen
public void handleMessage(TextMessage message, WebSocketSession wsSession) throws Exception {
String payload = message.getPayload();
if (StringUtils.isEmpty(payload)) {
if (!StringUtils.hasLength(payload)) {
return;
}
String[] messages;