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:
Phillip Webb
2012-12-19 14:35:57 -08:00
committed by Chris Beams
parent 7f0aa5cfb2
commit b0986049a3
550 changed files with 705 additions and 36 deletions

View File

@@ -30,6 +30,7 @@ import javax.portlet.PortletException;
* @author Juergen Hoeller
* @since 2.0
*/
@SuppressWarnings("serial")
public class ModelAndViewDefiningException extends PortletException {
private ModelAndView modelAndView;

View File

@@ -28,6 +28,7 @@ import org.springframework.core.style.StylerUtils;
* @author Juergen Hoeller
* @since 3.0.5
*/
@SuppressWarnings("serial")
public class NoHandlerFoundException extends PortletException {
/**

View File

@@ -22,6 +22,7 @@ package org.springframework.web.portlet.bind;
* @author Juergen Hoeller
* @since 2.0.2
*/
@SuppressWarnings("serial")
public class MissingPortletRequestParameterException extends PortletRequestBindingException {
private final String parameterName;

View File

@@ -26,6 +26,7 @@ import javax.portlet.PortletException;
* @author John A. Lewis
* @since 2.0
*/
@SuppressWarnings("serial")
public class PortletRequestBindingException extends PortletException {
/**

View File

@@ -37,6 +37,7 @@ import org.springframework.web.portlet.util.PortletUtils;
* @since 2.0
* @see org.springframework.web.portlet.util.PortletUtils#getParametersStartingWith
*/
@SuppressWarnings("serial")
public class PortletRequestParameterPropertyValues extends MutablePropertyValues {
/** Default prefix separator */

View File

@@ -241,6 +241,7 @@ public abstract class PortletApplicationContextUtils {
/**
* Factory that exposes the current request object on demand.
*/
@SuppressWarnings("serial")
private static class RequestObjectFactory implements ObjectFactory<PortletRequest>, Serializable {
public PortletRequest getObject() {
@@ -257,6 +258,7 @@ public abstract class PortletApplicationContextUtils {
/**
* Factory that exposes the current session object on demand.
*/
@SuppressWarnings("serial")
private static class SessionObjectFactory implements ObjectFactory<PortletSession>, Serializable {
public PortletSession getObject() {
@@ -273,6 +275,7 @@ public abstract class PortletApplicationContextUtils {
/**
* Factory that exposes the current WebRequest object on demand.
*/
@SuppressWarnings("serial")
private static class WebRequestObjectFactory implements ObjectFactory<WebRequest>, Serializable {
public WebRequest getObject() {

View File

@@ -28,6 +28,7 @@ import org.springframework.web.context.support.RequestHandledEvent;
* @see org.springframework.web.portlet.FrameworkPortlet
* @see org.springframework.context.ApplicationContext#publishEvent
*/
@SuppressWarnings("serial")
public class PortletRequestHandledEvent extends RequestHandledEvent {
/** Name of the portlet that handled the request */

View File

@@ -27,6 +27,7 @@ import org.springframework.util.StringUtils;
* @author Juergen Hoeller
* @since 3.0
*/
@SuppressWarnings("serial")
public class PortletRequestMethodNotSupportedException extends PortletException {
private String method;
@@ -78,4 +79,4 @@ public class PortletRequestMethodNotSupportedException extends PortletException
return this.supportedMethods;
}
}
}

View File

@@ -25,6 +25,7 @@ import javax.portlet.PortletException;
* @since 2.0
* @see org.springframework.web.portlet.handler.PortletContentGenerator
*/
@SuppressWarnings("serial")
public class PortletSessionRequiredException extends PortletException {
/**