Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play calls action method in parent class instead of child class #1105

Closed
cbxp opened this issue Feb 13, 2017 · 0 comments
Closed

Play calls action method in parent class instead of child class #1105

cbxp opened this issue Feb 13, 2017 · 0 comments
Assignees
Milestone

Comments

@cbxp
Copy link
Contributor

cbxp commented Feb 13, 2017

Let's assume we have parent controller class:

public class BaseController extends Controller {
  public void form() {
    ...
    foo();
    ....
  }

  protected void foo() {
     logger.info("PARENT FOO");
  }
}

and child controller class:

public class ChildController extends BaseController {
  @Override
  protected void foo() {
     logger.info("CHILD FOO");
  }
}

Result

When action ChildController.form is executed, the message PARENT FOO is logged.
Expected result: "CHILD FOO" should be logged.

@asolntsev asolntsev self-assigned this Feb 13, 2017
@asolntsev asolntsev added this to the 1.5.0 milestone Feb 13, 2017
asolntsev added a commit that referenced this issue Feb 13, 2017
Fixes #1105 invoke non-static method in child controller, not in pare…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants