Skip to content

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

Closed

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()抛出了空指针异常

Activity

  1. ralf0131 commented on Aug 9, 2018

    @ralf0131
    Contributor

    Hi, would you mind send a pull request?

  2. changed the title [-]Telnet invoke 方法时当参数中有null值时永远返回null (When using telnet "invoke", if there is a [null] param, the response always be [null] too)[/-] [+]When using telnet "invoke" method, if there is a [null] param, the response always be [null] [/+] on Aug 9, 2018
  3. added
    help wanted
    on Aug 10, 2018
  4. added
    type/bug
    on Aug 10, 2018
  5. added this to the 2.6.4 milestone on Aug 10, 2018
  6. added a commit that references this issue on Aug 13, 2018
    e588bc7
  7. added a commit that references this issue on Aug 14, 2018
  8. added a commit that references this issue on Aug 17, 2018
  9. diecui1202 commented on Sep 5, 2018

    @diecui1202

    Since the PR #2273 has been merged to master, we need a new PR that merge it to 2.6.x

  10. added
    help wanted
    and removed
    help wanted
    on Sep 5, 2018
  11. added a commit that references this issue on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedtype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions