Always use 'this.' when accessing fields

Ensure that `this.` is used consistently when accessing class
fields.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-25 11:37:17 -07:00
committed by Juergen Hoeller
parent eeebd51f57
commit 0b53c1096a
154 changed files with 374 additions and 373 deletions

View File

@@ -253,7 +253,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
@Override
public String toString() {
return "SendToMethodReturnValueHandler [annotationRequired=" + annotationRequired + "]";
return "SendToMethodReturnValueHandler [annotationRequired=" + this.annotationRequired + "]";
}

View File

@@ -538,7 +538,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
}
return;
}
stats.incrementDisconnectCount();
this.stats.incrementDisconnectCount();
handler.forward(message, stompAccessor);
}
else {

View File

@@ -431,7 +431,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
@Override
@Nullable
public String getFirst(String headerName) {
List<String> headerValues = headers.get(headerName);
List<String> headerValues = this.headers.get(headerName);
return headerValues != null ? headerValues.get(0) : null;
}
@@ -445,13 +445,13 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
*/
@Override
public void add(String headerName, @Nullable String headerValue) {
List<String> headerValues = headers.computeIfAbsent(headerName, k -> new LinkedList<>());
List<String> headerValues = this.headers.computeIfAbsent(headerName, k -> new LinkedList<>());
headerValues.add(headerValue);
}
@Override
public void addAll(String headerName, List<? extends String> headerValues) {
List<String> currentValues = headers.computeIfAbsent(headerName, k -> new LinkedList<>());
List<String> currentValues = this.headers.computeIfAbsent(headerName, k -> new LinkedList<>());
currentValues.addAll(headerValues);
}
@@ -472,7 +472,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
public void set(String headerName, @Nullable String headerValue) {
List<String> headerValues = new LinkedList<>();
headerValues.add(headerValue);
headers.put(headerName, headerValues);
this.headers.put(headerName, headerValues);
}
@Override
@@ -483,7 +483,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
@Override
public Map<String, String> toSingleValueMap() {
LinkedHashMap<String, String> singleValueMap = new LinkedHashMap<>(this.headers.size());
headers.forEach((key, value) -> singleValueMap.put(key, value.get(0)));
this.headers.forEach((key, value) -> singleValueMap.put(key, value.get(0)));
return singleValueMap;
}

View File

@@ -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.
@@ -57,10 +57,10 @@ abstract class AbstractMonoToListenableFutureAdapter<S, T> implements Listenable
adapted = adapt(result);
}
catch (Throwable ex) {
registry.failure(ex);
this.registry.failure(ex);
return;
}
registry.success(adapted);
this.registry.success(adapted);
})
.doOnError(this.registry::failure)
.toProcessor();

View File

@@ -277,7 +277,7 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
});
DirectProcessor<Void> completion = DirectProcessor.create();
TcpConnection<P> connection = new ReactorNettyTcpConnection<>(inbound, outbound, codec, completion);
scheduler.schedule(() -> connectionHandler.afterConnected(connection));
scheduler.schedule(() -> this.connectionHandler.afterConnected(connection));
inbound.withConnection(conn -> conn.addHandler(new StompMessageDecoder<>(codec)));
@@ -285,9 +285,9 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
.cast(Message.class)
.publishOn(scheduler, PUBLISH_ON_BUFFER_SIZE)
.subscribe(
connectionHandler::handleMessage,
connectionHandler::handleFailure,
connectionHandler::afterConnectionClosed);
this.connectionHandler::handleMessage,
this.connectionHandler::handleFailure,
this.connectionHandler::afterConnectionClosed);
return completion;
}
@@ -304,7 +304,7 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {
Collection<Message<P>> messages = codec.decode(in);
Collection<Message<P>> messages = this.codec.decode(in);
out.addAll(messages);
}
}