Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.
In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
This commit is contained in:
committed by
Chris Beams
parent
7f0aa5cfb2
commit
b0986049a3
@@ -24,6 +24,7 @@ import org.springframework.core.NestedRuntimeException;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpMessageConversionException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@ package org.springframework.http.converter;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpMessageNotReadableException extends HttpMessageConversionException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@ package org.springframework.http.converter;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpMessageNotWritableException extends HttpMessageConversionException {
|
||||
|
||||
/**
|
||||
@@ -44,4 +45,4 @@ public class HttpMessageNotWritableException extends HttpMessageConversionExcept
|
||||
public HttpMessageNotWritableException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.remoting.soap.SoapFaultException;
|
||||
* @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class JaxRpcSoapFaultException extends SoapFaultException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.remoting.soap.SoapFaultException;
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class JaxWsSoapFaultException extends SoapFaultException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.http.MediaType;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class HttpMediaTypeException extends ServletException {
|
||||
|
||||
private final List<MediaType> supportedMediaTypes;
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.http.MediaType;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpMediaTypeNotAcceptableException extends HttpMediaTypeException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.http.MediaType;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpMediaTypeNotSupportedException extends HttpMediaTypeException {
|
||||
|
||||
private final MediaType contentType;
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.http.HttpMethod;
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpRequestMethodNotSupportedException extends ServletException {
|
||||
|
||||
private String method;
|
||||
|
||||
@@ -24,6 +24,7 @@ import javax.servlet.ServletException;
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpSessionRequiredException extends ServletException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.validation.ObjectError;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MethodArgumentNotValidException extends Exception {
|
||||
|
||||
private final MethodParameter parameter;
|
||||
|
||||
@@ -22,6 +22,7 @@ package org.springframework.web.bind;
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0.2
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MissingServletRequestParameterException extends ServletRequestBindingException {
|
||||
|
||||
private final String parameterName;
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.web.util.NestedServletException;
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServletRequestBindingException extends NestedServletException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.web.util.WebUtils;
|
||||
* @author Juergen Hoeller
|
||||
* @see org.springframework.web.util.WebUtils#getParametersStartingWith
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServletRequestParameterPropertyValues extends MutablePropertyValues {
|
||||
|
||||
/** Default prefix separator */
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.util.StringUtils;
|
||||
* @since 3.0
|
||||
* @see org.springframework.web.bind.annotation.RequestMapping#params()
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class UnsatisfiedServletRequestParameterException extends ServletRequestBindingException {
|
||||
|
||||
private final String[] paramConditions;
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.core.NestedRuntimeException;
|
||||
* @since 2.5.6
|
||||
* @see HandlerMethodInvoker#invokeHandlerMethod
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HandlerMethodInvocationException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -707,6 +707,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
||||
/**
|
||||
* HTTP-specific subclass of UriTemplate, overriding the encode method.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
private static class HttpUrlTemplate extends UriTemplate {
|
||||
|
||||
public HttpUrlTemplate(String uriTemplate) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpSessionBindingListener;
|
||||
* @see RequestAttributes#registerDestructionCallback
|
||||
* @see ServletRequestAttributes#registerSessionDestructionCallback
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DestructionCallbackBindingListener implements HttpSessionBindingListener, Serializable {
|
||||
|
||||
private final Runnable destructionCallback;
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||
* @see org.springframework.web.HttpRequestHandler
|
||||
* @see org.springframework.web.servlet.DispatcherServlet
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class HttpRequestHandlerServlet extends HttpServlet {
|
||||
|
||||
private HttpRequestHandler target;
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.context.ApplicationEvent;
|
||||
* @see org.springframework.web.servlet.FrameworkServlet
|
||||
* @see org.springframework.context.ApplicationContext#publishEvent
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class RequestHandledEvent extends ApplicationEvent {
|
||||
|
||||
/** Session id that applied to the request, if any */
|
||||
|
||||
@@ -25,6 +25,7 @@ package org.springframework.web.context.support;
|
||||
* @see org.springframework.web.servlet.FrameworkServlet
|
||||
* @see org.springframework.context.ApplicationContext#publishEvent
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServletRequestHandledEvent extends RequestHandledEvent {
|
||||
|
||||
/** URL that the triggered the request */
|
||||
|
||||
@@ -59,6 +59,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||
* @author Colin Sampaleanu
|
||||
* @since 1.2.7
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DelegatingPhaseListenerMulticaster implements PhaseListener {
|
||||
|
||||
public PhaseId getPhaseId() {
|
||||
|
||||
@@ -23,6 +23,7 @@ package org.springframework.web.multipart;
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.0.1
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MaxUploadSizeExceededException extends MultipartException {
|
||||
|
||||
private final long maxUploadSize;
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.core.NestedRuntimeException;
|
||||
* @see MultipartResolver#resolveMultipart
|
||||
* @see org.springframework.web.multipart.support.MultipartFilter
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MultipartException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
* @since 29.09.2003
|
||||
* @see CommonsMultipartResolver
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CommonsMultipartFile implements MultipartFile, Serializable {
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(CommonsMultipartFile.class);
|
||||
|
||||
@@ -58,6 +58,7 @@ public class HttpSessionMutexListener implements HttpSessionListener {
|
||||
* Doesn't need to be anything but a plain Object to synchronize on.
|
||||
* Should be serializable to allow for HttpSession persistence.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
private static class Mutex implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.util.Assert;
|
||||
* @since 3.0
|
||||
* @see <a href="http://bitworking.org/projects/URI-Templates/">URI Templates</a>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class UriTemplate implements Serializable {
|
||||
|
||||
/** Captures URI template variable names. */
|
||||
|
||||
Reference in New Issue
Block a user