kwin commented on code in PR #872:
URL: https://github.com/apache/maven/pull/872#discussion_r1023582782
##########
maven-core/src/main/java/org/apache/maven/internal/impl/PropertiesAsMap.java:
##########
@@ -67,28 +67,30 @@ public boolean hasNext()
@Override
public Entry<String, String> next()
{
- if ( next == null )
+ if ( !hasNext() )
Review Comment:
although functionally correct I still find it weird to change the state in
`hasNext()`. Why not put the logic to look for the next entry in `next` and
simplify `hasNext()` with a simple check if `next == null` Also I find it very
confusing that `next = null` when the end of the iterator has not yet been
reached
--
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]