spring-cloud / spring-cloud/spring-cloud-config
Spring Cloud Config returns an empty string instead of an empty array
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
Describe the bug
After upgrading to the latest version of Spring Cloud Config, I encountered an issue where the cloud-config service returns an empty string ("") instead of an empty array ([]).
<spring-cloud.version>2024.0.0</spring-cloud.version>
Sample
Example:
config.yaml
network:
urls: []
I expect to receive the following object:
{
"network":{
"urls":[]
}
}
However, I receive this instead:
{
"network":{
"urls":""
}
}
I noticed a similar issue in the past, which might be related to this problem as well.
https://github.com/spring-cloud/spring-cloud-config/issues/1572
Could you please investigate the cause of this issue as soon as possible?
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the response using the config.yaml example with Spring Cloud version 2024.0.0, comparing an empty array with the returned empty string. Read the related issue #1572 for prior context, then trace the configuration conversion path that produces the response. Done means the example returns urls as [] without changing non-empty values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100