Skip to content

Replace all usages of method references (aka ::) with lambdas #2848

Description

@markushi

Description

As discussed here using method references might causes issues in combination with older version of the AGP.

Overall there are quite some usages of method references(>50), but since this issue is only relevant on Android, it only needs to be fixed for those parts.

E.g. JsonObjectSerializer.java

case STRING:
        done = handlePrimitive(reader::nextString);

should be replaced by

case STRING:
        done = handlePrimitive(() -> reader.nextString());

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions