Skip to content

karaf 4.4.9 - it is no longer possible to override numeric config properties via environment variables #2216

@saaaaaaarah

Description

@saaaaaaarah

I'm trying to override a numeric config property via environment variable. I think the change in this commit breaks the previous behavior. When overwriting environment variables, numeric values were previously stored as strings in the properties map because they were specified as strings in the configuration file, and now they are parsed as integers.

Previous:
if (properties.get(key) != null && (properties.get(key) instanceof Number)) { properties.put(key, Integer.parseInt(value)); } else { properties.put(key, value); }

Now:
int intValue = Integer.parseInt(value); properties.put(key, intValue);

This causes problems when using such properties as constructor arguments for beans, because the value is now resolved to null there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions