spring-projects / spring-projects/spring-framework

Environment.getProperty() method cannot process list items

Open
#35,179 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

in: core status: waiting-for-triage
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

first:
  second: i,like,fish

the yaml config above can be processed when following code is executed

List<String> values = environment.getProperty("key", (List<String>) List.class)

however, following yaml config cannot be processed by the code snippet above

first:
  second:
    - i
    - like
    - fish

Contributor guide

Open the contributing guide

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.

Research direction

Start at Environment.getProperty() and reproduce the difference between the comma-separated value and the YAML list shown in the issue. Trace how each configuration shape is converted to List; done when the YAML list containing i, like, and fish is returned through the method.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.