Description
I suggest two improvements in reading configuration:
- Suppose we have the following property in a conf file.
<property> <name> testing.property</name> <value>something</value> </property>
Try to get it by
Configuration conf = new Configuration(); String value = conf.get("testing.property"); //value == null here
We will get null since there is an eol in
<name> testing.property</name>
I suggest to trim all property names.
- I also suggest configuration to accept decimal, hexadecimal, and octal numbers (e.g. 011 is 9, 0xA is 10)
It can be easily done by replacing Integer.parseInt(...) with Integer.decode(...) in Configuration.getInt(...), similarly, in Configuration.getLong(...).