You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2020/05/24 10:43:21 UTC

[maven] branch Bananeweizen-MNG-6907 created (now 883bf57)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch Bananeweizen-MNG-6907
in repository https://gitbox.apache.org/repos/asf/maven.git.


      at 883bf57  [MNG-6907] endless loop in StringSearchModelInterpolator

This branch includes the following new commits:

     new 883bf57  [MNG-6907] endless loop in StringSearchModelInterpolator

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven] 01/01: [MNG-6907] endless loop in StringSearchModelInterpolator

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch Bananeweizen-MNG-6907
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 883bf572913559875149276adec4df7e74a6b9f3
Author: Michael Keppler <Mi...@gmx.de>
AuthorDate: Sun May 24 12:28:29 2020 +0200

    [MNG-6907] endless loop in StringSearchModelInterpolator
    
    Avoid endless recursion by checking for equality between current
    parameter and recursion parameter.
---
 .../maven/model/interpolation/StringSearchModelInterpolator.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
index 93e53b7..9fae53d 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
@@ -173,7 +173,11 @@ public class StringSearchModelInterpolator
             {
                 cacheEntry.interpolate( target, this );
 
-                traverseObjectWithParents( cls.getSuperclass(), target );
+                Class<?> superclass = cls.getSuperclass();
+                if ( superclass != cls )
+                {
+                    traverseObjectWithParents( superclass, target );
+                }
             }
         }