efegokdemir opened a new pull request, #1037: URL: https://github.com/apache/maven-enforcer/pull/1037
## Summary Fix the misleading deprecated-API warning emitted when an unknown Enforcer rule is configured. The warning is now emitted only after the legacy rule class has been loaded successfully. Fixes #1023 ## Changes - Instantiate the legacy rule before logging the compatibility warning. - Add a regression assertion that unknown rules do not emit the legacy warning. ## Testing - `mvn -pl maven-enforcer-plugin -am -Dtest=EnforcerRuleManagerTest -Dsurefire.failIfNoSpecifiedTests=false -Dspotless.apply.skip=true -Dspotless.check.skip=true test` — PASS (10 tests) - `git diff --check` — PASS The repository's Spotless formatter is not compatible with the available JDK 27 runtime (`NoSuchFieldError`); the focused test command therefore skipped Spotless only. Checkstyle and RAT completed successfully during the test build. AI assistance was used during investigation and implementation. The submitted changes were reviewed for correctness and are limited to this issue. -- 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]
