felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5306) Fileinstall can't read floats and doubles in .config files
Date Wed, 06 Sep 2017 12:07:00 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155260#comment-16155260

Guillaume Nodet commented on FELIX-5306:

Fwiw, I don't think this is a regression.  It was the case previously too.
[~emily.berk] is right about the format used.

> Fileinstall can't read floats and doubles in .config files 
> -----------------------------------------------------------
>                 Key: FELIX-5306
>                 URL: https://issues.apache.org/jira/browse/FELIX-5306
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: munene kiruja
> 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:
> {code}
> 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)
> {code} 
> The code is actually parsing using Integer and Long classes!! 

This message was sent by Atlassian JIRA

View raw message