Skip to content

Choose the most specific method when calling overloaded methods #5

Open
@lukaseder

Description

@lukaseder

Currently, jOOR chooses the "first" matching method if multiple overloaded methods are applicable. E.g.:

void method(Object o);
void method(Number o);
void method(Integer o);

// This should call method(Number), but it may also call method(Object)
on(Test.class).create(new Long("1"));

Finding the most specific method according to the rules of the JLS is not easy, in particular because jOOR follows its own rules. E.g., in the future, we may also want to consider private methods to be eligible for the search algorithm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions