Skip to content

Commit 668207d

Browse files
committed
fixed Portlet UnavailableException tests (SPR-7542)
1 parent 803b336 commit 668207d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

org.springframework.web.portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/PortletAnnotationControllerTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2010 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@
3232
import javax.portlet.PortletSession;
3333
import javax.portlet.RenderRequest;
3434
import javax.portlet.RenderResponse;
35-
import javax.portlet.UnavailableException;
3635
import javax.servlet.http.HttpServletRequest;
3736
import javax.servlet.http.HttpServletResponse;
3837

@@ -73,6 +72,7 @@
7372
import org.springframework.web.context.support.GenericWebApplicationContext;
7473
import org.springframework.web.portlet.DispatcherPortlet;
7574
import org.springframework.web.portlet.ModelAndView;
75+
import org.springframework.web.portlet.NoHandlerFoundException;
7676
import org.springframework.web.portlet.context.StaticPortletApplicationContext;
7777
import org.springframework.web.portlet.mvc.AbstractController;
7878
import org.springframework.web.servlet.View;
@@ -382,9 +382,9 @@ protected ApplicationContext createPortletApplicationContext(ApplicationContext
382382
MockRenderResponse response = new MockRenderResponse();
383383
try {
384384
portlet.render(request, response);
385-
fail("Should have thrown UnavailableException");
385+
fail("Should have thrown NoHandlerFoundException");
386386
}
387-
catch (UnavailableException ex) {
387+
catch (NoHandlerFoundException ex) {
388388
// expected
389389
}
390390

0 commit comments

Comments
 (0)