Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-262

some no working code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 4.1.0-incubating
    • None
    • rocketmq-namesrv
    • None

    Description

      when i view and study the source code of the rocketmq.
      i find some problems code.
      In the NamesrvStartup class, i find when the commandLine.hasOption('p') that the next code is
      make no difference:

      if (commandLine.hasOption('p')) {
               //the code below have no no difference,because the first arg is null. the printObjectProperties method will do nothing when first arg is null.
                      MixAll.printObjectProperties(null, namesrvConfig);
                      MixAll.printObjectProperties(null, nettyServerConfig);
                      System.exit(0);
                  }
      

      如果参数含有-p的话,走入这个分支,但是MixAll.printObjectProperties()方法内部实现,如果第一个log参数是null的话,不会做任何事情,是不是应该把配置参数打印在控制台上

      Attachments

        Activity

          People

            vintagewang Xiaorui Wang
            xpylq yzh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: