Skip to content

Replace deprecated getOrComputeIfAbsent() API calls#3944

Open
BACtaki wants to merge 2 commits intoapache:mainfrom
BACtaki:bugfix/deprecated_api
Open

Replace deprecated getOrComputeIfAbsent() API calls#3944
BACtaki wants to merge 2 commits intoapache:mainfrom
BACtaki:bugfix/deprecated_api

Conversation

@BACtaki
Copy link

@BACtaki BACtaki commented Mar 5, 2026

Replace deprecated getOrComputeIfAbsent() API calls for org.junit.jupiter.api.extension with computeIfAbsent().

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@BACtaki
Copy link
Author

BACtaki commented Mar 5, 2026

Requesting a quick review @adam-christian-software @snazy @dimas-b

Copy link
Contributor

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in other conversations, this change forced downstream projects that use integration-tests to adopt JUnit 6 (previously only JUnit 5 was required).... so I advised for delaying this change.

However, I can see that there's constant interest from the community to fix these deprecations... so I guess we might as well merge this change and address any (unlikely) fallout as it comes.

I think it might be worth specifically mentioning JUnit 6 in the CHANGELOG, though (section Changes). WDYT?

@BACtaki
Copy link
Author

BACtaki commented Mar 6, 2026

that use integration-tests

You make a very good point @dimas-b . We have to make this change at some point so we might as well make it now IMO. I have added a note in the changelog to highlight the point about downstream projects using JUnit 6. Let's see how it goes- I promise to address any fallout from this change, as unlikely as that may be (:

@adutra
Copy link
Contributor

adutra commented Mar 6, 2026

We have to make this change at some point so we might as well make it now

Wouldn't it be prudent to wait until after the 1.4.0 release, due in the next few days?

@BACtaki
Copy link
Author

BACtaki commented Mar 6, 2026

We have to make this change at some point so we might as well make it now

Wouldn't it be prudent to wait until after the 1.4.0 release, due in the next few days?

We can wait until the 1.4.0 release, there's no rush. Any specific changes in the release you think might be relevant to this PR @adutra ?

@dimas-b
Copy link
Contributor

dimas-b commented Mar 6, 2026

Yes, merging this after 1.4.0 is branched sounds like a good compromise to me.

@dimas-b
Copy link
Contributor

dimas-b commented Mar 6, 2026

For reference: the integration-tests module was specifically added for reuse in downstream projects in #590

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.

3 participants