Avoid creation of unused logger instance in AbstractMediaTypeExpression
Closes gh-25901
This commit is contained in:
		
							parent
							
								
									e176c4e799
								
							
						
					
					
						commit
						72b2dda17f
					
				|  | @ -1,5 +1,5 @@ | ||||||
| /* | /* | ||||||
|  * Copyright 2002-2018 the original author or authors. |  * Copyright 2002-2020 the original author or authors. | ||||||
|  * |  * | ||||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); |  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
|  * you may not use this file except in compliance with the License. |  * you may not use this file except in compliance with the License. | ||||||
|  | @ -16,9 +16,6 @@ | ||||||
| 
 | 
 | ||||||
| package org.springframework.web.reactive.result.condition; | package org.springframework.web.reactive.result.condition; | ||||||
| 
 | 
 | ||||||
| import org.apache.commons.logging.Log; |  | ||||||
| import org.apache.commons.logging.LogFactory; |  | ||||||
| 
 |  | ||||||
| import org.springframework.http.MediaType; | import org.springframework.http.MediaType; | ||||||
| import org.springframework.lang.Nullable; | import org.springframework.lang.Nullable; | ||||||
| import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | @ -35,8 +32,6 @@ import org.springframework.web.server.UnsupportedMediaTypeStatusException; | ||||||
|  */ |  */ | ||||||
| abstract class AbstractMediaTypeExpression implements Comparable<AbstractMediaTypeExpression>, MediaTypeExpression { | abstract class AbstractMediaTypeExpression implements Comparable<AbstractMediaTypeExpression>, MediaTypeExpression { | ||||||
| 
 | 
 | ||||||
| 	protected final Log logger = LogFactory.getLog(getClass()); |  | ||||||
| 
 |  | ||||||
| 	private final MediaType mediaType; | 	private final MediaType mediaType; | ||||||
| 
 | 
 | ||||||
| 	private final boolean isNegated; | 	private final boolean isNegated; | ||||||
|  |  | ||||||
|  | @ -22,8 +22,6 @@ import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
| import java.util.concurrent.ConcurrentHashMap; | import java.util.concurrent.ConcurrentHashMap; | ||||||
| 
 | 
 | ||||||
| import org.apache.commons.logging.Log; |  | ||||||
| import org.apache.commons.logging.LogFactory; |  | ||||||
| import reactor.core.publisher.Mono; | import reactor.core.publisher.Mono; | ||||||
| 
 | 
 | ||||||
| import org.springframework.core.MethodParameter; | import org.springframework.core.MethodParameter; | ||||||
|  | @ -41,8 +39,6 @@ import org.springframework.web.server.ServerWebExchange; | ||||||
|  */ |  */ | ||||||
| class HandlerMethodArgumentResolverComposite implements HandlerMethodArgumentResolver { | class HandlerMethodArgumentResolverComposite implements HandlerMethodArgumentResolver { | ||||||
| 
 | 
 | ||||||
| 	protected final Log logger = LogFactory.getLog(getClass()); |  | ||||||
| 
 |  | ||||||
| 	private final List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>(); | 	private final List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>(); | ||||||
| 
 | 
 | ||||||
| 	private final Map<MethodParameter, HandlerMethodArgumentResolver> argumentResolverCache = | 	private final Map<MethodParameter, HandlerMethodArgumentResolver> argumentResolverCache = | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| /* | /* | ||||||
|  * Copyright 2002-2018 the original author or authors. |  * Copyright 2002-2020 the original author or authors. | ||||||
|  * |  * | ||||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); |  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
|  * you may not use this file except in compliance with the License. |  * you may not use this file except in compliance with the License. | ||||||
|  | @ -16,9 +16,6 @@ | ||||||
| 
 | 
 | ||||||
| package org.springframework.web.servlet.mvc.condition; | package org.springframework.web.servlet.mvc.condition; | ||||||
| 
 | 
 | ||||||
| import org.apache.commons.logging.Log; |  | ||||||
| import org.apache.commons.logging.LogFactory; |  | ||||||
| 
 |  | ||||||
| import org.springframework.http.MediaType; | import org.springframework.http.MediaType; | ||||||
| import org.springframework.lang.Nullable; | import org.springframework.lang.Nullable; | ||||||
| import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | @ -33,8 +30,6 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  */ |  */ | ||||||
| abstract class AbstractMediaTypeExpression implements MediaTypeExpression, Comparable<AbstractMediaTypeExpression> { | abstract class AbstractMediaTypeExpression implements MediaTypeExpression, Comparable<AbstractMediaTypeExpression> { | ||||||
| 
 | 
 | ||||||
| 	protected final Log logger = LogFactory.getLog(getClass()); |  | ||||||
| 
 |  | ||||||
| 	private final MediaType mediaType; | 	private final MediaType mediaType; | ||||||
| 
 | 
 | ||||||
| 	private final boolean isNegated; | 	private final boolean isNegated; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue