Consistent formatting
This commit is contained in:
@@ -58,7 +58,7 @@ public class XmlPortletApplicationContextTests extends AbstractXmlWebApplication
|
||||
beanFactory.addBeanPostProcessor(new BeanPostProcessor() {
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
if(bean instanceof TestBean) {
|
||||
if (bean instanceof TestBean) {
|
||||
((TestBean) bean).getFriends().add("myFriend");
|
||||
}
|
||||
return bean;
|
||||
|
||||
@@ -162,9 +162,11 @@ public final class PortletWrappingControllerTests {
|
||||
public void processAction(ActionRequest request, ActionResponse response) throws PortletException {
|
||||
if (request.getParameter("test") != null) {
|
||||
response.setRenderParameter(RESULT_RENDER_PARAMETER_NAME, "myPortlet-action");
|
||||
} else if (request.getParameter(PORTLET_NAME_ACTION_REQUEST_PARAMETER_NAME) != null) {
|
||||
}
|
||||
else if (request.getParameter(PORTLET_NAME_ACTION_REQUEST_PARAMETER_NAME) != null) {
|
||||
response.setRenderParameter(RESULT_RENDER_PARAMETER_NAME, getPortletConfig().getPortletName());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("no request parameters");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,12 +435,13 @@ public final class PortletUtilsTests {
|
||||
public void testGetRequiredSessionAttributeWithExistingSessionAndNoAttribute() throws Exception {
|
||||
MockPortletSession session = new MockPortletSession();
|
||||
|
||||
final PortletRequest request = mock(PortletRequest.class);
|
||||
PortletRequest request = mock(PortletRequest.class);
|
||||
given(request.getPortletSession(false)).willReturn(session);
|
||||
try {
|
||||
PortletUtils.getRequiredSessionAttribute(request, "foo");
|
||||
fail("expected IllegalStateException");
|
||||
} catch (IllegalStateException ex) { /* expected */ }
|
||||
}
|
||||
catch (IllegalStateException ex) { /* expected */ }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user