Using square brackets for a list of strings causes an infinite loop

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

Start by reproducing the issue in the YAML reader with the square-bracketed List configuration, then compare its parsing path with the equivalent block-list form. Done means the inline list of strings no longer enters an infinite loop and both configurations deserialize successfully.

Written by the indexing model from the issue text.

Description

It looks like the yml reader goes into a deep loop if square brackets are found for a list of strings.
This configuration cause error:

stringList: ["test1", "test2", "test3"]

This configuration does NOT cause problems:

stringList: 
- "test1"
- "test2"
- "test3"

The example does not use a custom serializer, only a simple List<String> type.

Dominant language
Java
Stars
27
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Elytrium/java-serializer

All issues in Elytrium/java-serializer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.