Elytrium / Elytrium/java-serializer

Invalid serialization if single double quotation mark is present

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
27
Forks
4
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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";

}
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.