Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DS: Coercing Component Property Values: String -> Long  #794

@joerghoh

Description

@joerghoh

Currently the coercion rules mandate that the conversion from String to Long is done via Long.parseLong(String), but this method cannot parse the exponential notation of Long values.

The activate method has thrown an exception (org.apache.felix.log.LogException: org.osgi.service.component.ComponentException: java.lang.NumberFormatException: For input string: "1.2e+07")
org.apache.felix.log.LogException: org.osgi.service.component.ComponentException: java.lang.NumberFormatException: For input string: "1.2e+07"
	at org.apache.felix.scr.impl.inject.internal.Annotations$Handler.invoke(Annotations.java:379) [org.apache.felix.scr:2.2.12]
	at my.own.$Proxy193.aLongProperty(Unknown Source) [mybundle]
	at my.own.component.activate(component.java:229) [mybundle]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions