Skip to content

Add default implementation of iterable write on GenericWriter#44

Open
RobFaustLZ wants to merge 6 commits intomainfrom
feature/add-default-implementation-of-iterable-write
Open

Add default implementation of iterable write on GenericWriter#44
RobFaustLZ wants to merge 6 commits intomainfrom
feature/add-default-implementation-of-iterable-write

Conversation

@RobFaustLZ
Copy link
Member

No description provided.

@RobFaustLZ RobFaustLZ requested a review from a team as a code owner January 1, 2026 13:44
@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.92%. Comparing base (37216dd) to head (49553da).

Files with missing lines Patch % Lines
...n/java/com/labelzoom/api/output/GenericWriter.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #44      +/-   ##
============================================
- Coverage     58.17%   57.92%   -0.25%     
  Complexity      207      207              
============================================
  Files            49       50       +1     
  Lines           930      934       +4     
  Branches        105      105              
============================================
  Hits            541      541              
- Misses          376      380       +4     
  Partials         13       13              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@augmentcode
Copy link

augmentcode bot commented Jan 1, 2026

🤖 Augment PR Summary

Summary: Adds a bulk-write convenience method to GenericWriter and clarifies reader type-parameter naming to better convey input vs output.


Changes: Introduces GenericWriter#writeAll(Iterable<I>) as a default method delegating to write, and renames GenericReader/LabelReader generic parameters for readability.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

Test Results

17 tests  ±0   17 ✅ ±0   0s ⏱️ -1s
 4 suites ±0    0 💤 ±0 
 4 files   ±0    0 ❌ ±0 

Results for commit 8cff691. ± Comparison against base commit d9e84f2.

♻️ This comment has been updated with latest results.

@RobFaustLZ
Copy link
Member Author

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

public interface GenericWriter<I> {
void write(I item);

default void writeAll(Iterable<I> items) {
Copy link

Choose a reason for hiding this comment

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

writeAll(Iterable<I> items) is invariant in I, so a GenericWriter<Number> can’t accept a List<Integer> here even though write(Integer) would be valid; consider whether Iterable<? extends I> is intended for this API.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

void write(I item);

default void writeAll(Iterable<I> items) {
for (final I item : items) {
Copy link

Choose a reason for hiding this comment

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

writeAll will throw a NullPointerException if items is null; since this is a public default API method, it may be worth documenting the non-null contract (or otherwise handling it) to avoid surprising callers.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


default void writeAll(Iterable<I> items) {
for (final I item : items) {
write(item);
Copy link

Choose a reason for hiding this comment

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

writeAll introduces new behavior but currently has no direct tests around it; adding a small unit test that asserts write(...) is invoked once per element (and in order) would help prevent regressions.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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.

1 participant