fix(serde-hjson): Make inlineCommentType builder-style in HjsonWriter.Options
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -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