Skip to content

NIFI-14742 Replaced for loop missed by PMD's ForLoopCanBeForeach rule with for each loop.#10084

Merged
exceptionfactory merged 1 commit intoapache:mainfrom
dan-s1:NIFI-14742
Jul 11, 2025
Merged

NIFI-14742 Replaced for loop missed by PMD's ForLoopCanBeForeach rule with for each loop.#10084
exceptionfactory merged 1 commit intoapache:mainfrom
dan-s1:NIFI-14742

Conversation

@dan-s1
Copy link
Contributor

@dan-s1 dan-s1 commented Jul 11, 2025

Summary

NIFI-14742
I only found this one instance which was not caught by the PMD's ForLoopCanBeForeach rule.
I tried looking for other cases with Intellij's find in files with the following regular expression
for \(int\s?.+\s?=\s?0
but I did not find any other for loops which could be changed to a for each loop.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@dan-s1 dan-s1 changed the title NIFI-14742 Replaced for loop with for each loop missed by PMD's ForLoopCanBeForeach rule. NIFI-14742 Replaced for loop missed by PMD's ForLoopCanBeForeach rule with for each loop. Jul 11, 2025
@exceptionfactory exceptionfactory merged commit 98aad34 into apache:main Jul 11, 2025
6 checks passed
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.

2 participants