Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The format for specifying a float in the .config format is <key>=F"<float value> and similarly for doubles but with the type character D.
When the floats and doubles are encountered in the config, java.lang.NumberFormatException is thrown with the message like:
java.lang.NumberFormatException: For input string: "400.333" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.parseInt(Integer.java:615)
The code is actually parsing using Integer and Long classes!!
Attachments
Issue Links
- is related to
-
FELIX-5642 string configurations in *.config files breaking behaviour change in 3.6.0
- Closed
-
SLING-7757 Switch to ConfigurationHandler which supports user-friendly float/double values
- Resolved