Never use 'this.' when accessing loggers

Ensure that `this.` is never used when accessing loggers.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-25 11:13:17 -07:00
committed by Juergen Hoeller
parent 0b53c1096a
commit 9de3689f63
14 changed files with 57 additions and 57 deletions

View File

@@ -82,7 +82,7 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
* container.
*/
public final void onDataAvailable() {
this.logger.trace("I/O event onDataAvailable");
logger.trace("I/O event onDataAvailable");
this.state.get().onDataAvailable(this);
}
@@ -91,7 +91,7 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
* all data has been read.
*/
public void onAllDataRead() {
this.logger.trace("I/O event onAllDataRead");
logger.trace("I/O event onAllDataRead");
this.state.get().onAllDataRead(this);
}
@@ -99,8 +99,8 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
* Sub-classes can call this to delegate container error notifications.
*/
public final void onError(Throwable ex) {
if (this.logger.isTraceEnabled()) {
this.logger.trace("I/O event onError: " + ex);
if (logger.isTraceEnabled()) {
logger.trace("I/O event onError: " + ex);
}
this.state.get().onError(this, ex);
}

View File

@@ -103,7 +103,7 @@ public abstract class AbstractListenerWriteFlushProcessor<T> implements Processo
* container to cancel the upstream subscription.
*/
protected void cancel() {
this.logger.trace("Received request to cancel");
logger.trace("Received request to cancel");
if (this.subscription != null) {
this.subscription.cancel();
}

View File

@@ -100,7 +100,7 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
* container.
*/
public final void onWritePossible() {
this.logger.trace("Received onWritePossible");
logger.trace("Received onWritePossible");
this.state.get().onWritePossible(this);
}
@@ -109,7 +109,7 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
* container to cancel the upstream subscription.
*/
public void cancel() {
this.logger.trace("Received request to cancel");
logger.trace("Received request to cancel");
if (this.subscription != null) {
this.subscription.cancel();
}

View File

@@ -313,14 +313,14 @@ class ServletServerHttpResponse extends AbstractListenerServerHttpResponse {
flush();
}
boolean ready = ServletServerHttpResponse.this.isWritePossible();
if (this.logger.isTraceEnabled()) {
this.logger.trace("write: " + dataBuffer + " ready: " + ready);
if (logger.isTraceEnabled()) {
logger.trace("write: " + dataBuffer + " ready: " + ready);
}
int remaining = dataBuffer.readableByteCount();
if (ready && remaining > 0) {
int written = writeToOutputStream(dataBuffer);
if (this.logger.isTraceEnabled()) {
this.logger.trace("written: " + written + " total: " + remaining);
if (logger.isTraceEnabled()) {
logger.trace("written: " + written + " total: " + remaining);
}
if (written == remaining) {
if (logger.isTraceEnabled()) {

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.
@@ -164,8 +164,8 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
InetSocketAddress address = (this.hostname != null ?
new InetSocketAddress(this.hostname, this.port) : new InetSocketAddress(this.port));
HttpServer server = HttpServer.create(address, this.backlog);
if (this.logger.isInfoEnabled()) {
this.logger.info("Starting HttpServer at address " + address);
if (logger.isInfoEnabled()) {
logger.info("Starting HttpServer at address " + address);
}
server.start();
this.server = server;