[jira] [Commented] (FELIX-5642) string configurations in *.config files breaking behaviour change in 3.6.0

2017-08-17 Thread Ferry Huberts (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-5642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16131196#comment-16131196
 ] 

Ferry Huberts commented on FELIX-5642:
--

See also #5306

> string configurations in *.config files breaking behaviour change in 3.6.0
> --
>
> Key: FELIX-5642
> URL: https://issues.apache.org/jira/browse/FELIX-5642
> Project: Felix
>  Issue Type: Bug
>  Components: File Install
>Affects Versions: fileinstall-3.6.0
>Reporter: Ferry Huberts
>Priority: Critical
>
> I have a X.config file with:
> {quote}
> networkInterface="wlp3s0"
> {quote}
> With fileinstall 3.5.8 this gets injected into my ds component's 
> configuration as
> {quote}
> networkInterface=wlp3s0
> {quote}
> (so the quotes are removed)
> With fileinstall 3.6.0 this gets injected into my ds component's 
> configuration as
> {quote}
> networkInterface="wlp3s0"
> {quote}
> (so the quotes are NOT removed)
> This is a BREAKING change.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FELIX-5306) Fileinstall can't read floats and doubles in .config files

2017-08-17 Thread Ferry Huberts (JIRA)

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

Ferry Huberts commented on FELIX-5306:
--

See also #5642

> 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 =F" 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
(v6.4.14#64029)


[jira] [Commented] (FELIX-5306) Fileinstall can't read floats and doubles in .config files

2017-08-17 Thread Emily Berk (JIRA)

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

Emily Berk commented on FELIX-5306:
---

I encountered this issue as well for {{org.apache.felix.fileinstall}} 3.6.0.

For {{myfloatProperty=F"10.5"}}, I get
{code}
Failed to install artifact: myService.config
java.lang.NumberFormatException: For input string: "10.5"
at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) 
~[?:?]
at java.lang.Integer.parseInt(Integer.java:580) [?:?]
at java.lang.Integer.parseInt(Integer.java:615) [?:?]
at 
org.apache.felix.utils.properties.ConfigurationHandler.readSimple(ConfigurationHandler.java:482)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.utils.properties.ConfigurationHandler.readValue(ConfigurationHandler.java:369)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.utils.properties.ConfigurationHandler.read(ConfigurationHandler.java:281)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.utils.properties.TypedProperties.convertFromString(TypedProperties.java:353)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.utils.properties.TypedProperties.get(TypedProperties.java:180) 
[8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.ConfigInstaller.setConfig(ConfigInstaller.java:244)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.ConfigInstaller.install(ConfigInstaller.java:78)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
 [8:org.apache.felix.fileinstall:3.6.0]
at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)
 [8:org.apache.felix.fileinstall:3.6.0]
{code}


I didn't have luck trying other variations:
{{myfloatProperty==f"10.5"}}
{{myfloatProperty=F10.5}}
{{myfloatProperty=f10.5}}
{{myfloatProperty=F"0x4128"}} (IEEE 757 format)
{{myfloatProperty=f"0x4128"}}
{{myfloatProperty=F0x4128}}
{{myfloatProperty=f0x4128}}

Documentation should be updated to explain the syntax for floats and doubles.

> 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 =F" 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
(v6.4.14#64029)