Skip to content

Dubbo 2.7.6 breaks the generic invocation behavior #6728

Closed
@JasonMing

Description

@JasonMing

Environment

  • Dubbo version: 2.7.6 +

Steps to reproduce this issue

GenericService genericService = ...;
genericService.$invoke("method", null /* parameterTypes */, new Object[] { /* args */ });

Before 2.7.6, the parameterType parameter supports null value, means use the method without overloads.

However, since 2.7.6, see: ad2d30b#diff-d799d91b73870eef3c22b89216a3554fR74, a check args.length != types.length was added. An NPE will be thrown when types is null.

Expected Result

Support nullable parameterTypes.

Actual Result

A guard check args.length != types.length in ad2d30b#diff-d799d91b73870eef3c22b89216a3554fR74 causes NPE when types is null.

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