Skip to content

Map<K,V> with escaped key not works properly in application.yml #1243

Closed

Description

@musashi-miyamoto

Describe the bug
If map key is escaped string (like [/**]), VSCode YAML code completion not works properly.

To Reproduce

  • Windows 11 23H2 (Build 22631.3447)
  • OpenJDK 21.0.2
  • Spring Boot v3.2.5
  • VSCode v1.88.1
    • Language Support for Java(TM) by Red Hat 1.30.0
    • Spring Boot Tools v1.53.0

Sample configuratin class:

@ConfigurationProperties(prefix = "demo")
public class RootConfig {
    private Map<String, ChildConfig> pathMap;
    // Getters and Setters...
}

public class ChildConfig {
    private String host;
    private int port;
    // Getters and Setters...
}

Key without escape works properly:
image

Key with escape provides no completion:
image

Requires one extra deeper indentation:
image

Completion provides no host, used in previous key:
image

Sample

https://github.com/musashi-miyamoto/sts4-configuration-issue-reproduce-sample

Activity

  1. added
    for: eclipse
    for: vscode
    and removed on Apr 29, 2024
  2. added this to the 4.23.0.RELEASE milestone on Apr 29, 2024
  3. BoykoAlex commented on May 15, 2024

    @BoykoAlex
    Contributor

    Fixed with 212dacf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsefor: vscodetheme: property-editing-supporttype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions