diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java b/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java index 04b7320b100..b083e95b27e 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -18,7 +18,6 @@ package org.springframework.mock.web; import java.io.IOException; import java.io.InputStream; - import javax.servlet.ServletInputStream; import org.springframework.util.Assert; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java b/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java index e1625775850..66fca5df2f9 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -18,7 +18,6 @@ package org.springframework.mock.web; import java.io.IOException; import java.io.OutputStream; - import javax.servlet.ServletOutputStream; import org.springframework.util.Assert; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java b/org.springframework.test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java index aedfa790877..fe5a0bc23fc 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockBodyContent.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockBodyContent.java index 829d109cdae..3fb6ca77030 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockBodyContent.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockBodyContent.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.Writer; - import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.BodyContent; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java index fd87175939c..bb0ab8aa598 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterChain.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterChain.java index b4e53bdd438..3f74cac8b54 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterChain.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterChain.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterConfig.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterConfig.java index 69d50dacadf..f6d051935b7 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterConfig.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockFilterConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. @@ -16,12 +16,10 @@ package org.springframework.mock.web; -import java.util.Enumeration; -import java.util.Properties; import java.util.Collections; -import java.util.Map; +import java.util.Enumeration; import java.util.LinkedHashMap; - +import java.util.Map; import javax.servlet.FilterConfig; import javax.servlet.ServletContext; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java index 090a55d770b..b7c0a1174ba 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. @@ -28,7 +28,6 @@ import java.util.Collections; import java.util.Date; import java.util.Enumeration; import java.util.HashSet; -import java.util.Hashtable; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; @@ -97,7 +96,7 @@ public class MockHttpServletRequest implements HttpServletRequest { // ServletRequest properties //--------------------------------------------------------------------- - private final Hashtable attributes = new Hashtable(); + private final Map attributes = new LinkedHashMap(); private String characterEncoding; @@ -146,7 +145,7 @@ public class MockHttpServletRequest implements HttpServletRequest { /** * The key is the lowercase header name; the value is a {@link HeaderValueHolder} object. */ - private final Map headers = new Hashtable(); + private final Map headers = new LinkedHashMap(); private String method; @@ -285,7 +284,7 @@ public class MockHttpServletRequest implements HttpServletRequest { public Enumeration getAttributeNames() { checkActive(); - return this.attributes.keys(); + return Collections.enumeration(this.attributes.keySet()); } public String getCharacterEncoding() { @@ -612,7 +611,7 @@ public class MockHttpServletRequest implements HttpServletRequest { return this.authType; } - public void setCookies(Cookie[] cookies) { + public void setCookies(Cookie... cookies) { this.cookies = cookies; } diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java index a55dec343ec..d941c466952 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. @@ -26,12 +26,10 @@ import java.io.Writer; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; - import javax.servlet.ServletOutputStream; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpSession.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpSession.java index 8bfbf96a96e..757414dbbcc 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpSession.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockJspWriter.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockJspWriter.java index f9f65de2c2e..1d5bf928bf8 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockJspWriter.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockJspWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -19,7 +19,6 @@ package org.springframework.mock.web; import java.io.IOException; import java.io.PrintWriter; import java.io.Writer; - import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspWriter; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartFile.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartFile.java index 8e12da1ac5a..a4b6af7e4c8 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartFile.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartFile.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java index d0eb95c74a5..57b6aadeb50 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockPageContext.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockPageContext.java index c278ce4696b..534500ac88f 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockPageContext.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockPageContext.java @@ -19,7 +19,7 @@ package org.springframework.mock.web; import java.io.IOException; import java.util.Collections; import java.util.Enumeration; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import javax.el.ELContext; import javax.servlet.Servlet; @@ -61,7 +61,7 @@ public class MockPageContext extends PageContext { private final ServletConfig servletConfig; - private final Map attributes = new HashMap(); + private final Map attributes = new LinkedHashMap(); private JspWriter out; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java index c3ed4d54bb7..17485d21f38 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletConfig.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletConfig.java index ca15d76a870..c62ec1520d0 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletConfig.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletContext.java b/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletContext.java index 55edd042a44..fb8b57e8fd8 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletContext.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/MockServletContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 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. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java b/org.springframework.test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java index 9fe173b8ad3..3b22b1f966a 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -17,7 +17,6 @@ package org.springframework.mock.web; import java.io.IOException; - import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.Servlet; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java index e9c8587745b..bec6687887c 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java @@ -17,11 +17,6 @@ package org.springframework.mock.web.portlet; import java.io.IOException; -import java.io.Serializable; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.Map; import javax.portlet.ActionResponse; import javax.portlet.PortalContext; @@ -29,10 +24,8 @@ import javax.portlet.PortletMode; import javax.portlet.PortletModeException; import javax.portlet.WindowState; import javax.portlet.WindowStateException; -import javax.xml.namespace.QName; import org.springframework.util.Assert; -import org.springframework.util.CollectionUtils; /** * Mock implementation of the {@link javax.portlet.ActionResponse} interface. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java index 4a71c7d7a83..8f36c3a7640 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java @@ -26,7 +26,6 @@ import java.io.UnsupportedEncodingException; import javax.portlet.ClientDataRequest; import javax.portlet.PortalContext; import javax.portlet.PortletContext; -import javax.portlet.PortletMode; /** * Mock implementation of the {@link javax.portlet.ClientDataRequest} interface. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java index aa8dac4ce1e..1a00e8b2d55 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java @@ -16,8 +16,8 @@ package org.springframework.mock.web.portlet; -import javax.portlet.EventResponse; import javax.portlet.EventRequest; +import javax.portlet.EventResponse; /** * Mock implementation of the {@link javax.portlet.EventResponse} interface. diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java index ec9574491cf..92ee6c0a465 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java @@ -23,7 +23,6 @@ import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; - import javax.portlet.PortletPreferences; import javax.portlet.PreferencesValidator; import javax.portlet.ReadOnlyException; diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java index 92973e5f1af..b885f358526 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java @@ -482,7 +482,7 @@ public class MockPortletRequest implements PortletRequest { return this.windowID; } - public void setCookies(Cookie[] cookies) { + public void setCookies(Cookie... cookies) { this.cookies = cookies; } diff --git a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java index 131110971d4..68536584471 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java @@ -16,20 +16,18 @@ package org.springframework.mock.web.portlet; -import java.io.IOException; import java.io.Serializable; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; -import javax.portlet.ActionResponse; import javax.portlet.PortalContext; import javax.portlet.PortletMode; import javax.portlet.PortletModeException; +import javax.portlet.StateAwareResponse; import javax.portlet.WindowState; import javax.portlet.WindowStateException; -import javax.portlet.StateAwareResponse; import javax.xml.namespace.QName; import org.springframework.util.Assert;