Skip to content

AbstractConfiguration::getUInt does not parse hex numbers #1462

@IronCaterpillar

Description

@IronCaterpillar

The above method is described as follows:
// Returns the unsigned int value of the property with the given name.
/// Throws a NotFoundException if the key does not exist.
/// Throws a SyntaxException if the property can not be converted
/// to an unsigned int.
/// Numbers starting with 0x are treated as hexadecimal.
/// If the value contains references to other properties (${}), these
/// are expanded.

but in fact the conversion is done by invoking NumberParser::parseUnsigned which callsstrToInt(s.c_str(), value, NUM_BASE_DEC, thSep);. As a result we get Syntax exception.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions