Skip to content

@ConfigProperty for java.util.Duration with defaultValue flagged as error #1207

Open
@fbricon

Description

same issue as redhat-developer/vscode-quarkus#631:

the following code generates an error:

    @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

Labels

bugSomething isn't workingquarkusQuarkus support

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions