Polishing (selective backports from master)

This commit is contained in:
Juergen Hoeller
2018-02-12 13:45:53 +01:00
parent 33d655a634
commit afe461609c
33 changed files with 196 additions and 199 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
*/
public class StompSubProtocolErrorHandler implements SubProtocolErrorHandler<byte[]> {
private static byte[] EMPTY_PAYLOAD = new byte[0];
private static final byte[] EMPTY_PAYLOAD = new byte[0];
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -66,7 +67,8 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
"com.fasterxml.jackson.databind.ObjectMapper", TransportHandlingSockJsService.class.getClassLoader());
private final Map<TransportType, TransportHandler> handlers = new HashMap<TransportType, TransportHandler>();
private final Map<TransportType, TransportHandler> handlers =
new EnumMap<TransportType, TransportHandler>(TransportType.class);
private SockJsMessageCodec messageCodec;