Skip to content

Commit 72b2dda

Browse files
committed
Avoid creation of unused logger instance in AbstractMediaTypeExpression
Closes gh-25901
1 parent e176c4e commit 72b2dda

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractMediaTypeExpression.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.web.reactive.result.condition;
1818

19-
import org.apache.commons.logging.Log;
20-
import org.apache.commons.logging.LogFactory;
21-
2219
import org.springframework.http.MediaType;
2320
import org.springframework.lang.Nullable;
2421
import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,8 +32,6 @@
3532
*/
3633
abstract class AbstractMediaTypeExpression implements Comparable<AbstractMediaTypeExpression>, MediaTypeExpression {
3734

38-
protected final Log logger = LogFactory.getLog(getClass());
39-
4035
private final MediaType mediaType;
4136

4237
private final boolean isNegated;

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/HandlerMethodArgumentResolverComposite.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import java.util.Map;
2323
import java.util.concurrent.ConcurrentHashMap;
2424

25-
import org.apache.commons.logging.Log;
26-
import org.apache.commons.logging.LogFactory;
2725
import reactor.core.publisher.Mono;
2826

2927
import org.springframework.core.MethodParameter;
@@ -41,8 +39,6 @@
4139
*/
4240
class HandlerMethodArgumentResolverComposite implements HandlerMethodArgumentResolver {
4341

44-
protected final Log logger = LogFactory.getLog(getClass());
45-
4642
private final List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>();
4743

4844
private final Map<MethodParameter, HandlerMethodArgumentResolver> argumentResolverCache =

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.web.servlet.mvc.condition;
1818

19-
import org.apache.commons.logging.Log;
20-
import org.apache.commons.logging.LogFactory;
21-
2219
import org.springframework.http.MediaType;
2320
import org.springframework.lang.Nullable;
2421
import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,8 +30,6 @@
3330
*/
3431
abstract class AbstractMediaTypeExpression implements MediaTypeExpression, Comparable<AbstractMediaTypeExpression> {
3532

36-
protected final Log logger = LogFactory.getLog(getClass());
37-
3833
private final MediaType mediaType;
3934

4035
private final boolean isNegated;

0 commit comments

Comments
 (0)