Skip to content

After version 1.38, putting a ternary as a generic parameter in a function call gives an incorrect errorΒ #3899

@DatBrute

Description

@DatBrute

json.put("id", id == null ? null : id.longValue());

(json and id are both objects of our own types)
error over .put:

The method put(String, T) in the type Json is not applicable for the arguments (String, Long)Java(67108979)

lines without a ternary conditional operator, such as below, do not give an error

json.put("id", id.longValue());

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions