GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove unneeded TypeValidation opt-outs by timtebeek · Pull Request #329 · openrewrite/rewrite-logging-frameworks

Conversation

@timtebeek

@timtebeek timtebeek commented Nov 13, 2026

Copy link
Copy Markdown
Member

What

Removes or narrows TypeValidation opt-outs found with ./gradlew test -Dorg.openrewrite.test.failOnUnneededOptOuts=all.

  • Removed: typeValidationOptions in JulToSlf4jTest (3 tests) and Slf4jToLog4jTest.changeLombokLogAnnotation; they hid nothing.
  • Narrowed: Log4j2ToSlf4j1Test.changeLombokLogAnnotation to identifiers(false), with a comment: log is the field Lombok generates, and Lombok does not run in the test (I confirmed log is the only unresolved identifier).
  • Types now fully validated, one quality check relaxed:
    • CommonsLoggingToSlf4j1Test.changeLombokLogAnnotation: the type opt-out is gone; it needs parserTypedTrees(false). The comment says why: ChangeType leaves log.info(..) typed as Logger.info(Object), where the parser gives Logger.info(String).
    • JulToLog4jTest.changeLombokLogAnnotation: typeValidationOptions replaced by parserTypedTrees(Erasure) (the detector's suggestion). CommonsLoggingToLog4jTest.changeLombokLogAnnotation, which had the same opt-out, now relaxes only parserTypedTrees(false) too.

Verified

Full suite passes with the detector on (503 tests, 1 skipped).

Not touched

The ChangeType method-type mismatch above is a recipe typing defect; I did not fix it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@timtebeek
Remove unneeded TypeValidation opt-outs
260f8de
Found with -Dorg.openrewrite.test.failOnUnneededOptOuts=all.

- Remove four per-test opt-outs that were not needed (JulToSlf4jTest x3, Slf4jToLog4jTest) and one that is replaced by a quality check (CommonsLoggingToSlf4j1Test).
- Narrow Log4j2ToSlf4j1Test to identifiers(false), saying that Lombok's generated log field has no type.
- JulToLog4jTest: parserTypedTrees relaxed only to Erasure.
- CommonsLoggingToSlf4j1Test: parserTypedTrees(false) with the reason.
@moderne-meeseeks moderne-meeseeks Bot added this to OpenRewrite Nov 13, 2026
@moderne-meeseeks moderne-meeseeks Bot assigned timtebeek Nov 13, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Nov 13, 2026
@timtebeek
timtebeek merged commit 3434c8b into main Nov 13, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@timtebeek
timtebeek deleted the narrow-type-validation-opt-outs branch November 13, 2026 16:31
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@timtebeek timtebeek

Labels

None yet

Projects

OpenRewrite
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@timtebeek
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.