Polishing
This commit is contained in:
@@ -422,10 +422,10 @@ public class ResponseEntity<T> extends HttpEntity<T> {
|
||||
@Override
|
||||
public BodyBuilder eTag(String eTag) {
|
||||
if (eTag != null) {
|
||||
if(!eTag.startsWith("\"") && !eTag.startsWith("W/\"")) {
|
||||
if (!eTag.startsWith("\"") && !eTag.startsWith("W/\"")) {
|
||||
eTag = "\"" + eTag;
|
||||
}
|
||||
if(!eTag.endsWith("\"")) {
|
||||
if (!eTag.endsWith("\"")) {
|
||||
eTag = eTag + "\"";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -234,7 +234,7 @@ public class ContentNegotiationManagerFactoryBean
|
||||
strategies.add(new HeaderContentNegotiationStrategy());
|
||||
}
|
||||
|
||||
if(this.defaultNegotiationStrategy != null) {
|
||||
if (this.defaultNegotiationStrategy != null) {
|
||||
strategies.add(defaultNegotiationStrategy);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class HttpMessageConverterExtractor<T> implements ResponseExtractor<T> {
|
||||
public T extractData(ClientHttpResponse response) throws IOException {
|
||||
|
||||
MessageBodyClientHttpResponseWrapper responseWrapper = new MessageBodyClientHttpResponseWrapper(response);
|
||||
if(!responseWrapper.hasMessageBody() || responseWrapper.hasEmptyMessageBody()) {
|
||||
if (!responseWrapper.hasMessageBody() || responseWrapper.hasEmptyMessageBody()) {
|
||||
return null;
|
||||
}
|
||||
MediaType contentType = getContentType(responseWrapper);
|
||||
|
||||
@@ -61,7 +61,7 @@ class MessageBodyClientHttpResponseWrapper implements ClientHttpResponse {
|
||||
responseStatus == HttpStatus.NOT_MODIFIED) {
|
||||
return false;
|
||||
}
|
||||
else if(this.getHeaders().getContentLength() == 0) {
|
||||
else if (this.getHeaders().getContentLength() == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -180,7 +180,7 @@ public class UrlPathHelper {
|
||||
String path;
|
||||
|
||||
// if the app container sanitized the servletPath, check against the sanitized version
|
||||
if(servletPath.indexOf(sanitizedPathWithinApp) != -1) {
|
||||
if (servletPath.indexOf(sanitizedPathWithinApp) != -1) {
|
||||
path = getRemainingPath(sanitizedPathWithinApp, servletPath, false);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user