Skip to content

Replace ListWriter usage in TempDir documentation examples#5677

Merged
mpkorstanje merged 3 commits into
junit-team:mainfrom
codingkiddo:docs/replace-listwriter-tempdir-examples
May 18, 2026
Merged

Replace ListWriter usage in TempDir documentation examples#5677
mpkorstanje merged 3 commits into
junit-team:mainfrom
codingkiddo:docs/replace-listwriter-tempdir-examples

Conversation

@codingkiddo

Copy link
Copy Markdown
Contributor

Summary

This updates the @TempDir documentation examples to use standard JDK APIs instead of the internal ListWriter helper.

Changes

  • Replace ListWriter usage in the Java TempDirectoryDemo
  • Replace ListWriter usage in the Kotlin TempDirectoryDemo
  • Remove the now-unused ListWriter helper

This keeps the examples self-contained and avoids referencing a non-JDK, non-JUnit utility type.

Fixes #5634.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>
@codingkiddo codingkiddo force-pushed the docs/replace-listwriter-tempdir-examples branch from 847de2a to 7f15d78 Compare May 16, 2026 14:07

@mpkorstanje mpkorstanje left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cheers!

This wasn't my preferred solution, but with some changes (see below) Files.write and ListWriter are close enough in function that we can replace one with the other.

Comment thread documentation/src/test/java/example/TempDirectoryDemo.java Outdated
@codingkiddo codingkiddo force-pushed the docs/replace-listwriter-tempdir-examples branch from 33dcc62 to 736c975 Compare May 18, 2026 04:31
@testlens-app

testlens-app Bot commented May 18, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 736c975
▶️ Tests: 1090 executed
⚪️ Checks: 16/16 completed


Learn more about TestLens at testlens.app.

@mpkorstanje mpkorstanje self-requested a review May 18, 2026 14:56
@mpkorstanje mpkorstanje added this pull request to the merge queue May 18, 2026
@mpkorstanje mpkorstanje removed this pull request from the merge queue due to a manual request May 18, 2026
@mpkorstanje mpkorstanje added this pull request to the merge queue May 18, 2026
Merged via the queue into junit-team:main with commit 85597f4 May 18, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation mentions ListWriter

2 participants