fix(serde-hjson): Make inlineCommentType builder-style in HjsonWriter.Options

This commit is contained in:
2026-03-01 20:16:14 +01:00
parent e879050a33
commit 1b9958f980
2 changed files with 3 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
to be more closely aligned with Java's identifier rules. to be more closely aligned with Java's identifier rules.
- `attributes-extension`: The `AttributesReadWriteFilterExtension` now correctly skips non-matching compound entries - `attributes-extension`: The `AttributesReadWriteFilterExtension` now correctly skips non-matching compound entries
instead of returning `null` for them. instead of returning `null` for them.
- `serde-hjson`: `inlineCommentType` on `HjsonWriter.Options` now correctly works builder-style.
## [0.7.0] - 2025-12-19 ## [0.7.0] - 2025-12-19

View File

@@ -604,11 +604,12 @@ public class HjsonWriter implements TweedDataWriter {
private HjsonCommentType multilineCommentType = HjsonCommentType.BLOCK; private HjsonCommentType multilineCommentType = HjsonCommentType.BLOCK;
private HjsonStringType preferredInlineStringType = HjsonStringType.INLINE_QUOTELESS; private HjsonStringType preferredInlineStringType = HjsonStringType.INLINE_QUOTELESS;
public void inlineCommentType(HjsonCommentType commentType) { public Options inlineCommentType(HjsonCommentType commentType) {
if (commentType.block()) { if (commentType.block()) {
throw new IllegalArgumentException("Inline comment type must not be a block comment type: " + commentType); throw new IllegalArgumentException("Inline comment type must not be a block comment type: " + commentType);
} }
this.inlineCommentType = commentType; this.inlineCommentType = commentType;
return this;
} }
} }
} }