Skip to content

When using telnet "invoke" method, if there is a [null] param, the response always be [null]  #2218

@elvis9xu163

Description

@elvis9xu163

dubbo> invoke com.alibaba.dubbo.demo.DemoService.sayHello(null) // null as parameter
null

reason:
InvokeTelnetHandler.isMatch(Class<?>[] types, List args)
...
} else if (ReflectUtils.isPrimitive(arg.getClass())) { // there should judge arg is null first

原因: InvokeTelnetHandler.isMatch(Class<?>[] types, List args)中判断arg的类型时未做null值判断, arg.getClass()抛出了空指针异常

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedEverything needs help from contributorstype/bugBugs to being fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions