Polishing

This commit is contained in:
Juergen Hoeller 2017-10-09 13:59:29 +02:00
parent ad4c8e7c0d
commit cc6e6490d2
2 changed files with 18 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class HttpMessageConverterExtractor<T> implements ResponseExtractor<T> {
Assert.notNull(responseType, "'responseType' must not be null"); Assert.notNull(responseType, "'responseType' must not be null");
Assert.notEmpty(messageConverters, "'messageConverters' must not be empty"); Assert.notEmpty(messageConverters, "'messageConverters' must not be empty");
this.responseType = responseType; this.responseType = responseType;
this.responseClass = (responseType instanceof Class) ? (Class<T>) responseType : null; this.responseClass = (responseType instanceof Class ? (Class<T>) responseType : null);
this.messageConverters = messageConverters; this.messageConverters = messageConverters;
this.logger = logger; this.logger = logger;
} }

View File

@ -1,3 +1,19 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.resource; package org.springframework.web.servlet.resource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
@ -18,4 +34,5 @@ public interface HttpResource extends Resource {
* @return the HTTP response headers * @return the HTTP response headers
*/ */
HttpHeaders getResponseHeaders(); HttpHeaders getResponseHeaders();
} }