Version
3.7.1
Context
An Environment variable like PORT=8080 is converted to 8080.0 (double) in config json.
Do you have a reproducer?
Add Environment Variable PORT = 8080 to your system.
val configRetriever = ConfigRetriever.create(vertx)
configRetriever.rxGetConfig().flatMap { configJson ->
configJson.getInteger("PORT") // Exception: double cannot be casted to Integer
}
Extra
The cause of the issue is in class io.vertx.config.spi.utils.JsonObjectHelper. There in convert method a number value would always be converted to a double but a check is missing if it is a pure Integer.
Version
3.7.1
Context
An Environment variable like PORT=8080 is converted to 8080.0 (double) in config json.
Do you have a reproducer?
Add Environment Variable PORT = 8080 to your system.
Extra
The cause of the issue is in class
io.vertx.config.spi.utils.JsonObjectHelper. There in convert method a number value would always be converted to a double but a check is missing if it is a pure Integer.