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

[MNG-6907] fix endless loop in StringSearchModelInterpolator #350

Closed
wants to merge 1 commit into from

Conversation

Bananeweizen
Copy link
Contributor

Avoid endless recursion by checking for equality between current parameter and recursion parameter. Although it seems unreasonable to have Java classes, where the superclass is identical to the current class, I've experienced this in practice.

I've verified there are no other code locations using a similar recursion pattern in StringSearchModelInterpolator or its successor StringVisitorModelInterpolator.

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MNG-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

Core IT has not been run. Documentation says to use profile "run-tis", but there is no such profile.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Avoid endless recursion by checking for equality between current
parameter and recursion parameter.
@khmarbaise
Copy link
Member

khmarbaise commented May 24, 2020

First let us check what CI says...

https://builds.apache.org/job/maven-box/job/maven/job/Bananeweizen-MNG-6907/

Copy link
Contributor

@rfscholte rfscholte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look correct to me. Something like root().firstNode().firstNode().firstNode() looks valid to me.
Hence, this PR requires a unittest to cover such a case as well.

@slachiewicz
Copy link
Member

SearchStringInterpreter is no longer in use in Maven Core and in 3.6.3 shouldn't be injected

@rfscholte
Copy link
Contributor

So this means that a plugin that needs it, will require at least Maven 3.6.2 at compile time (or use reflection) and at runtime it must verify if StringVisitorModelInterpolator is avaible. If not, keep using the StringSearchModelInterpolator.
If that is the idea, one should close this PR and MNG-6907

gnodet added a commit to gnodet/maven that referenced this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants