Elytrium / Elytrium/java-serializer

Invalid serialization if single double quotation mark is present

オープン
#2 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。