Polishing (selective backports from master)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* 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.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class ServletServerHttpAsyncRequestControl implements ServerHttpAsyncRequestControl, AsyncListener {
|
||||
|
||||
private static long NO_TIMEOUT_VALUE = Long.MIN_VALUE;
|
||||
private static final long NO_TIMEOUT_VALUE = Long.MIN_VALUE;
|
||||
|
||||
|
||||
private final ServletServerHttpRequest request;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -31,14 +31,13 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* HttpInvokerRequestExecutor implementation that uses standard J2SE facilities
|
||||
* to execute POST requests, without support for HTTP authentication or
|
||||
* advanced configuration options.
|
||||
* {@link org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor} implementation
|
||||
* that uses standard Java facilities to execute POST requests, without support for HTTP
|
||||
* authentication or advanced configuration options.
|
||||
*
|
||||
* <p>Designed for easy subclassing, customizing specific template methods.
|
||||
* However, consider {@code HttpComponentsHttpInvokerRequestExecutor} for
|
||||
* more sophisticated needs: The J2SE HttpURLConnection is rather limited
|
||||
* in its capabilities.
|
||||
* <p>Designed for easy subclassing, customizing specific template methods. However,
|
||||
* consider {@code HttpComponentsHttpInvokerRequestExecutor} for more sophisticated needs:
|
||||
* The standard {@link HttpURLConnection} class is rather limited in its capabilities.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1
|
||||
@@ -73,7 +72,7 @@ public class SimpleHttpInvokerRequestExecutor extends AbstractHttpInvokerRequest
|
||||
|
||||
|
||||
/**
|
||||
* Execute the given request through a standard J2SE HttpURLConnection.
|
||||
* Execute the given request through a standard {@link HttpURLConnection}.
|
||||
* <p>This method implements the basic processing workflow:
|
||||
* The actual work happens in this class's template methods.
|
||||
* @see #openConnection
|
||||
@@ -97,7 +96,7 @@ public class SimpleHttpInvokerRequestExecutor extends AbstractHttpInvokerRequest
|
||||
}
|
||||
|
||||
/**
|
||||
* Open an HttpURLConnection for the given remote invocation request.
|
||||
* Open an {@link HttpURLConnection} for the given remote invocation request.
|
||||
* @param config the HTTP invoker configuration that specifies the
|
||||
* target service
|
||||
* @return the HttpURLConnection for the given request
|
||||
@@ -171,7 +170,7 @@ public class SimpleHttpInvokerRequestExecutor extends AbstractHttpInvokerRequest
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the given response as contained in the HttpURLConnection object,
|
||||
* Validate the given response as contained in the {@link HttpURLConnection} object,
|
||||
* throwing an exception if it does not correspond to a successful HTTP response.
|
||||
* <p>Default implementation rejects any HTTP status code beyond 2xx, to avoid
|
||||
* parsing the response body and trying to deserialize from a corrupted stream.
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ
|
||||
"EEE MMM dd HH:mm:ss yyyy"
|
||||
};
|
||||
|
||||
private static TimeZone GMT = TimeZone.getTimeZone("GMT");
|
||||
private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
|
||||
|
||||
/** Checking for Servlet 3.0+ HttpServletResponse.getHeader(String) */
|
||||
private static final boolean servlet3Present =
|
||||
|
||||
Reference in New Issue
Block a user