fix(serde-hjson): Make inlineCommentType builder-style in HjsonWriter.Options
This commit is contained in:
@@ -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.
|
||||
- `attributes-extension`: The `AttributesReadWriteFilterExtension` now correctly skips non-matching compound entries
|
||||
instead of returning `null` for them.
|
||||
- `serde-hjson`: `inlineCommentType` on `HjsonWriter.Options` now correctly works builder-style.
|
||||
|
||||
## [0.7.0] - 2025-12-19
|
||||
|
||||
|
||||
@@ -604,11 +604,12 @@ public class HjsonWriter implements TweedDataWriter {
|
||||
private HjsonCommentType multilineCommentType = HjsonCommentType.BLOCK;
|
||||
private HjsonStringType preferredInlineStringType = HjsonStringType.INLINE_QUOTELESS;
|
||||
|
||||
public void inlineCommentType(HjsonCommentType commentType) {
|
||||
public Options inlineCommentType(HjsonCommentType commentType) {
|
||||
if (commentType.block()) {
|
||||
throw new IllegalArgumentException("Inline comment type must not be a block comment type: " + commentType);
|
||||
}
|
||||
this.inlineCommentType = commentType;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user