spring-cloud / spring-cloud/spring-cloud-config

Spring Cloud Config returns an empty string instead of an empty array

Open
#2,746 6 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.