[
https://issues.apache.org/jira/browse/MNG-7597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634477#comment-17634477
]
ASF GitHub Bot commented on MNG-7597:
-------------------------------------
kwin commented on code in PR #872:
URL: https://github.com/apache/maven/pull/872#discussion_r1023128378
##########
maven-core/src/main/java/org/apache/maven/internal/impl/PropertiesAsMap.java:
##########
@@ -71,6 +71,8 @@ public Entry<String, String> next()
{
throw new NoSuchElementException();
}
+ Entry<Object, Object> next = this.next;
+ this.next = null;
Review Comment:
This should only be null once the final property key has been reached, there
is no obligation to call `hasNext()` in between, e.g. something like two
subsequent calls to `next()` must succeed in case the underlying property
contains more than one key.
> Infinite loop in PropertiesAsMap
> --------------------------------
>
> Key: MNG-7597
> URL: https://issues.apache.org/jira/browse/MNG-7597
> Project: Maven
> Issue Type: Bug
> Affects Versions: 4.0.0-alpha-2
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 4.0.0-alpha-3
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)