Sahil-Jaiswal-189 opened a new issue, #13638:
URL: https://github.com/apache/maven/issues/13638
### Affected version
4.1.0-SNAPSHOT
### Bug description
## Description
The interpolator can get stuck when a property refers to itself.
For example:
```properties
outer=${a}
a=${a}
```
When resolving `outer`, it looks up `a`. But the value of `a` is `${a}`, so
it looks up `a` again. This repeats until Java throws `StackOverflowError`.
It should detect the circular reference and report a clear error instead.
This bug existed before the utility extraction in #13379 and is being
reported separately, as requested during review.
## Affected version
`4.1.0-SNAPSHOT` (`master`).
The earliest affected released version has not been determined.
## Reproducer
```java
DefaultInterpolator.substVars(
"${a}", "outer", null,
Map.of("a", "${a}"), null, null, false);
```
## Expected result
An `InterpolatorException` explaining the problem:
```text
recursive variable reference: a
```
## Actual result
```text
java.lang.StackOverflowError
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]