Skip to content

BOY: jython PVUtil.getLong return BigInteger #1802

@berryma4

Description

@berryma4

I'm not sure if this is new, but

longVal = PVUtil.getLong(pv[0])
pv[1].setValue(longVal)

this above code does not log an error, and it also doesn't set the value.
Changing to a double works:

doubleVal = PVUtil.getDouble(pv[0])
pv[1].setValue(doubleVal)

It seems getLong returns a BigInteger, while setValue doesn't accept BigInteger (and doesn't give an error).
I suppose this might work:

longVal = PVUtil.getLong(pv[0])
pv[1].setValue(longVal.longValue())

Is this a new jython return type mapping, or was it always broken?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions