Skip to content

@ConfigProperty for java.util.Duration with defaultValue flagged as error in VS code #631

@Dougniel

Description

@Dougniel

In a similar way to #612 with java.util.Duration, the following code generates an error in the VS Code UI:

    @ConfigProperty(name = "app.duration", defaultValue = "PT15M")
    Duration duration;

❌ The error message looks like that :

'PT15M' does not match the expected type of 'Duration'.microprofile-config(DEFAULT_VALUE_IS_WRONG_TYPE)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions