Details
-
Bug
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
4.1.0-incubating
-
None
-
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的话,不会做任何事情,是不是应该把配置参数打印在控制台上