Struts actions returning null cannot be overridden

Description

Having a hook plugin, struts actions returning a null value cannot be overridden. The reason for this is a NullPointerException in the execute() -method in com.liferay.portal.struts.StrutsActionAdapter. In the current version (LR6 EE SP2, 6.0.12) the method expects the original action to return an ActionForward as seen below.

@Override
public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception {

ActionForward actionForward = _action.execute(_actionMapping, _actionForm, request, response);
return actionForward.getPath();

}

An example of a struts action returning null is com.liferay.portal.action.LoginAction (/c/portal/login).

Activity

Show:

Michael SaechangFebruary 10, 2012 at 2:37 PM

Committed on:
6.0.x GIT ID: e69e6c912cb6708cbf97898592ed16adca2bbffd.
6.1.x GIT ID: 85b3a60cf46b07b1eac98cb3132654acf6d89b67.
6.2.x GIT ID: 85b3a60cf46b07b1eac98cb3132654acf6d89b67.

Fixed

Details

Assignee

Reporter

Branch Version/s

6.1.x
6.0.x

Backported to Branch

Committed

Git Pull Request

Components

Priority

Zendesk Support

Created January 10, 2012 at 3:29 AM
Updated June 24, 2023 at 3:46 PM
Resolved March 12, 2012 at 1:40 PM
Loading...