2 Commits
Author SHA1 Message Date
안승현 d38bff8957 Extract childNodes constant in JSONML
Replace the four repeated "childNodes" literals with a private
static final constant.

Address SonarQube rule java:S1192 without changing parsing behavior.
2026-10-01 17:15:16 +09:00
안승현 5dfa60ba0a Fix reserved childNodes attribute check in JSONML
JSONML object-form parsing uses "childNodes" to store child elements,
but the reserved-attribute check incorrectly used "childNode".

This rejected ordinary "childNode" attributes while accepting
"childNodes" attributes, whose values could then be overwritten
by the element's children.

Correct the reserved-attribute check to use "childNodes" and add
JUnit 4 regression tests covering:
- Rejection of reserved "childNodes" attributes in object-form parsing
- Preservation of ordinary "childNode" attributes and child content
- Continued rejection of reserved "tagName" attributes
- Preservation of both attribute names in array-form parsing

Verify each scenario with keepStrings enabled and disabled.

Validation:
- All 40 JSONML tests pass
- Full test suite: 807 passed, 6 skipped on Java 11 with Gradle 8.13
- Both bug regression tests fail against the original implementation

Fixes #1080
2026-10-01 16:55:38 +09:00