From 8dbbb533f36e7e339939ffbe7c607e686985b691 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 20 Jan 2009 18:01:51 +0000 Subject: [PATCH] consistent copies of mocks --- .../mock/web/portlet/MockActionResponse.java | 7 ------- .../mock/web/portlet/MockClientDataRequest.java | 1 - .../mock/web/portlet/MockEventResponse.java | 2 +- .../mock/web/portlet/MockPortletPreferences.java | 1 - .../mock/web/portlet/MockPortletRequest.java | 2 +- .../mock/web/portlet/MockStateAwareResponse.java | 4 +--- 6 files changed, 3 insertions(+), 14 deletions(-) diff --git a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockActionResponse.java b/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockActionResponse.java index e9c8587745b..bec6687887c 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockActionResponse.java +++ b/org.springframework.web.portlet/src/test/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.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockClientDataRequest.java b/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockClientDataRequest.java index 4a71c7d7a83..8f36c3a7640 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockClientDataRequest.java +++ b/org.springframework.web.portlet/src/test/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.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockEventResponse.java b/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockEventResponse.java index aa8dac4ce1e..1a00e8b2d55 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockEventResponse.java +++ b/org.springframework.web.portlet/src/test/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.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletPreferences.java b/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletPreferences.java index ec9574491cf..92ee6c0a465 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletPreferences.java +++ b/org.springframework.web.portlet/src/test/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.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletRequest.java b/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletRequest.java index 92973e5f1af..b885f358526 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletRequest.java +++ b/org.springframework.web.portlet/src/test/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.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java b/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java index 131110971d4..68536584471 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java +++ b/org.springframework.web.portlet/src/test/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;