You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2018/07/27 06:09:00 UTC

[jira] [Commented] (SLING-7757) Switch to ConfigurationHandler which supports user-friendly float/double values

    [ https://issues.apache.org/jira/browse/SLING-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559311#comment-16559311 ] 

Carsten Ziegeler commented on SLING-7757:
-----------------------------------------

I think we should rather support the new official JSON format for configurations

> Switch to ConfigurationHandler which supports user-friendly float/double values
> -------------------------------------------------------------------------------
>
>                 Key: SLING-7757
>                 URL: https://issues.apache.org/jira/browse/SLING-7757
>             Project: Sling
>          Issue Type: Improvement
>          Components: Installer
>    Affects Versions: Installer Core 3.8.10
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Currently the {{.config}} format only supports float/double values in the IEEE 754 floating-point bit layout (described in https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html#intBitsToFloat%28int%29 and https://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#longBitsToDouble(long) respectively). With FELIX-5306 this has been fixed for the {{ConfigurationHandler}} in package {{org.apache.felix.utils.properties}} (https://github.com/apache/felix/blob/trunk/utils/src/main/java/org/apache/felix/utils/properties/ConfigurationHandler.java). The OSGi installer still uses the {{ConfigurationHandler}} from {{org.apache.felix.cm.file}} (https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/file/ConfigurationHandler.java), which seems to be deprecated and which has not received user-friendly float/double support. Therefore the OSGi Installer should be updated to use the latest version from Felix Utils (https://github.com/apache/sling-org-apache-sling-installer-core/blob/0a34e33dd26092437be5180e34979abbf9a88300/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java#L257).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)