Elytrium / Elytrium/java-serializer
Invalid serialization if single double quotation mark is present
- 主要言語
- Java
- スター
- 27
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
If you insert only one double quotation mark in the field like this:
```yaml
test-section:
# Some description for this test value1
value-test: "
# Some description for this test value2
value-test-2: "test2"
```
The result of the serialization will be as follows:
```yaml
test-section:
# Some description for this test value1
value-test: " # Some description for this test value2 value-test-2: "
# Some description for this test value2
value-test-2: "test2"
```
It looks like reader keeps looking for the next double quote even when the next field starts.
Configuration used:
```java
public class TestSettings extends YamlSerializable {
@Transient
private static final SerializerConfig CONFIG = new SerializerConfig.Builder()
.setCommentValueIndent(1)
.build();
@Transient
public static final TestSettings IMP = new TestSettings();
public TestSettings() {
super(CONFIG);
}
public TEST_SECTION TEST_SECTION = new TEST_SECTION();
public static class TEST_SECTION {
@Comment(value = {
@CommentValue("Some description for this test value1"),
}, at = Comment.At.PREPEND)
public String VALUE_TEST = "test1";
@Comment(value = {
@CommentValue("Some description for this test value2"),
}, at = Comment.At.PREPEND)
public String VALUE_TEST2 = "test2";
}
}
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、提供された Java TestSettings 構成を使って issue に示されている YAML シリアライゼーションを再現し、単独の二重引用符が次のフィールドにまたがってどのように読み取られるかに焦点を当てます。次のフィールドが分離されたままとなり、シリアライズされた出力が次のキーを消費することなく両方の値とコメントを保持すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100