Replace space indentation with tabs

Issue: SPR-10127
This commit is contained in:
Phillip Webb
2012-12-19 14:55:41 -08:00
committed by Chris Beams
parent 1762157ad1
commit 2cf45bad86
154 changed files with 1481 additions and 1476 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2012 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.
@@ -96,8 +96,8 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
private static final String[] DATE_FORMATS = new String[] {
"EEE, dd MMM yyyy HH:mm:ss zzz",
"EEE, dd-MMM-yy HH:mm:ss zzz",
"EEE MMM dd HH:mm:ss yyyy"
"EEE, dd-MMM-yy HH:mm:ss zzz",
"EEE MMM dd HH:mm:ss yyyy"
};
private static TimeZone GMT = TimeZone.getTimeZone("GMT");

View File

@@ -463,7 +463,7 @@ public class MediaType implements Comparable<MediaType> {
* @return a read-only map, possibly empty, never <code>null</code>
*/
public Map<String, String> getParameters() {
return parameters;
return parameters;
}
/**

View File

@@ -50,13 +50,13 @@ final class HttpComponentsClientHttpRequest extends AbstractBufferingClientHttpR
private final HttpUriRequest httpRequest;
private final HttpContext httpContext;
private final HttpContext httpContext;
public HttpComponentsClientHttpRequest(HttpClient httpClient, HttpUriRequest httpRequest, HttpContext httpContext) {
public HttpComponentsClientHttpRequest(HttpClient httpClient, HttpUriRequest httpRequest, HttpContext httpContext) {
this.httpClient = httpClient;
this.httpRequest = httpRequest;
this.httpContext = httpContext;
this.httpContext = httpContext;
}

View File

@@ -128,7 +128,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
getHttpClient().getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeout);
}
public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException {
public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException {
HttpUriRequest httpRequest = createHttpUriRequest(httpMethod, uri);
postProcessHttpRequest(httpRequest);
return new HttpComponentsClientHttpRequest(getHttpClient(), httpRequest, createHttpContext(httpMethod, uri));
@@ -172,16 +172,16 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest
protected void postProcessHttpRequest(HttpUriRequest request) {
}
/**
* Template methods that creates a {@link HttpContext} for the given HTTP method and URI.
* <p>The default implementation returns {@code null}.
* @param httpMethod the HTTP method
* @param uri the URI
* @return the http context
*/
protected HttpContext createHttpContext(HttpMethod httpMethod, URI uri) {
return null;
}
/**
* Template methods that creates a {@link HttpContext} for the given HTTP method and URI.
* <p>The default implementation returns {@code null}.
* @param httpMethod the HTTP method
* @param uri the URI
* @return the http context
*/
protected HttpContext createHttpContext(HttpMethod httpMethod, URI uri) {
return null;
}
/**
* Shutdown hook that closes the underlying

View File

@@ -73,38 +73,38 @@ final class SimpleStreamingClientHttpRequest extends AbstractClientHttpRequest {
else {
this.connection.setChunkedStreamingMode(this.chunkSize);
}
writeHeaders(headers);
this.connection.connect();
writeHeaders(headers);
this.connection.connect();
this.body = this.connection.getOutputStream();
}
return new NonClosingOutputStream(this.body);
}
private void writeHeaders(HttpHeaders headers) {
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
String headerName = entry.getKey();
for (String headerValue : entry.getValue()) {
this.connection.addRequestProperty(headerName, headerValue);
}
}
}
private void writeHeaders(HttpHeaders headers) {
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
String headerName = entry.getKey();
for (String headerValue : entry.getValue()) {
this.connection.addRequestProperty(headerName, headerValue);
}
}
}
@Override
@Override
protected ClientHttpResponse executeInternal(HttpHeaders headers) throws IOException {
try {
if (this.body != null) {
this.body.close();
}
else {
writeHeaders(headers);
this.connection.connect();
}
}
catch (IOException ex) {
// ignore
}
return new SimpleClientHttpResponse(this.connection);
}
try {
if (this.body != null) {
this.body.close();
}
else {
writeHeaders(headers);
this.connection.connect();
}
}
catch (IOException ex) {
// ignore
}
return new SimpleClientHttpResponse(this.connection);
}
private static class NonClosingOutputStream extends FilterOutputStream {

View File

@@ -183,7 +183,7 @@ public class BurlapClientInterceptor extends UrlBasedRemoteAccessor implements M
}
else {
return new RemoteAccessException(
"Cannot access Burlap remote service at [" + getServiceUrl() + "]", ex);
"Cannot access Burlap remote service at [" + getServiceUrl() + "]", ex);
}
}

View File

@@ -264,7 +264,7 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements
}
else {
return new RemoteAccessException(
"Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex);
"Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex);
}
}

View File

@@ -210,7 +210,7 @@ public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor
}
else {
throw new RemoteAccessException(
"Could not access HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
"Could not access HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
}
}

View File

@@ -185,7 +185,7 @@ public abstract class GenericFilterBean implements
}
catch (BeansException ex) {
String msg = "Failed to set bean properties on filter '" +
filterConfig.getFilterName() + "': " + ex.getMessage();
filterConfig.getFilterName() + "': " + ex.getMessage();
logger.error(msg, ex);
throw new NestedServletException(msg, ex);
}
@@ -310,9 +310,9 @@ public abstract class GenericFilterBean implements
// Fail if we are still missing properties.
if (missingProps != null && missingProps.size() > 0) {
throw new ServletException(
"Initialization from FilterConfig for filter '" + config.getFilterName() +
"' failed; the following required properties were missing: " +
StringUtils.collectionToDelimitedString(missingProps, ", "));
"Initialization from FilterConfig for filter '" + config.getFilterName() +
"' failed; the following required properties were missing: " +
StringUtils.collectionToDelimitedString(missingProps, ", "));
}
}
}

View File

@@ -76,7 +76,7 @@ public abstract class FacesContextUtils {
* @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
*/
public static WebApplicationContext getRequiredWebApplicationContext(FacesContext fc)
throws IllegalStateException {
throws IllegalStateException {
WebApplicationContext wac = getWebApplicationContext(fc);
if (wac == null) {

View File

@@ -107,7 +107,7 @@ public class UriComponentsBuilder {
protected UriComponentsBuilder() {
}
// Factory methods
// Factory methods
/**
* Returns a new, empty builder.
@@ -253,7 +253,7 @@ public class UriComponentsBuilder {
// build methods
// build methods
/**
* Builds a {@code UriComponents} instance from the various components contained in this builder.
@@ -306,7 +306,7 @@ public class UriComponentsBuilder {
return build(false).expand(uriVariableValues);
}
// URI components methods
// URI components methods
/**
* Initializes all components of this URI builder with the components of the given URI.

View File

@@ -67,7 +67,7 @@ public class UriTemplate implements Serializable {
this.uriTemplate = uriTemplate;
this.variableNames = parser.getVariableNames();
this.matchPattern = parser.getMatchPattern();
this.uriComponents = UriComponentsBuilder.fromUriString(uriTemplate).build();
this.uriComponents = UriComponentsBuilder.fromUriString(uriTemplate).build();
}
/**
@@ -78,7 +78,7 @@ public class UriTemplate implements Serializable {
return this.variableNames;
}
// expanding
// expanding
/**
* Given the Map of variables, expands this template into a URI. The Map keys represent variable names,
@@ -98,12 +98,12 @@ public class UriTemplate implements Serializable {
* or if it does not contain values for all the variable names
*/
public URI expand(Map<String, ?> uriVariables) {
UriComponents expandedComponents = uriComponents.expand(uriVariables);
UriComponents expandedComponents = uriComponents.expand(uriVariables);
UriComponents encodedComponents = expandedComponents.encode();
return encodedComponents.toUri();
return encodedComponents.toUri();
}
/**
/**
* Given an array of variables, expand this template into a full URI. The array represent variable values.
* The order of variables is significant.
* <p>Example:
@@ -118,12 +118,12 @@ public class UriTemplate implements Serializable {
* or if it does not contain sufficient variables
*/
public URI expand(Object... uriVariableValues) {
UriComponents expandedComponents = uriComponents.expand(uriVariableValues);
UriComponents expandedComponents = uriComponents.expand(uriVariableValues);
UriComponents encodedComponents = expandedComponents.encode();
return encodedComponents.toUri();
return encodedComponents.toUri();
}
// matching
// matching
/**
* Indicate whether the given URI matches this template.

View File

@@ -142,16 +142,16 @@ public abstract class WebUtils {
String root = servletContext.getRealPath("/");
if (root == null) {
throw new IllegalStateException(
"Cannot set web app root system property when WAR file is not expanded");
"Cannot set web app root system property when WAR file is not expanded");
}
String param = servletContext.getInitParameter(WEB_APP_ROOT_KEY_PARAM);
String key = (param != null ? param : DEFAULT_WEB_APP_ROOT_KEY);
String oldValue = System.getProperty(key);
if (oldValue != null && !StringUtils.pathEquals(oldValue, root)) {
throw new IllegalStateException(
"Web app root system property already set to different value: '" +
key + "' = [" + oldValue + "] instead of [" + root + "] - " +
"Choose unique values for the 'webAppRootKey' context-param in your web.xml files!");
"Web app root system property already set to different value: '" +
key + "' = [" + oldValue + "] instead of [" + root + "] - " +
"Choose unique values for the 'webAppRootKey' context-param in your web.xml files!");
}
System.setProperty(key, root);
servletContext.log("Set web app root system property: '" + key + "' = [" + root + "]");
@@ -279,7 +279,7 @@ public abstract class WebUtils {
* @throws IllegalStateException if the session attribute could not be found
*/
public static Object getRequiredSessionAttribute(HttpServletRequest request, String name)
throws IllegalStateException {
throws IllegalStateException {
Object attr = getSessionAttribute(request, name);
if (attr == null) {
@@ -330,13 +330,13 @@ public abstract class WebUtils {
}
catch (InstantiationException ex) {
throw new IllegalArgumentException(
"Could not instantiate class [" + clazz.getName() +
"] for session attribute '" + name + "': " + ex.getMessage());
"Could not instantiate class [" + clazz.getName() +
"] for session attribute '" + name + "': " + ex.getMessage());
}
catch (IllegalAccessException ex) {
throw new IllegalArgumentException(
"Could not access default constructor of class [" + clazz.getName() +
"] for session attribute '" + name + "': " + ex.getMessage());
"Could not access default constructor of class [" + clazz.getName() +
"] for session attribute '" + name + "': " + ex.getMessage());
}
session.setAttribute(name, sessionObject);
}