[
https://issues.apache.org/jira/browse/ROCKETMQ-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
yzh updated ROCKETMQ-262:
-------------------------
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:
{code:java}
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);
}
{code}
如果参数含有-p的话,走入这个分支,但是MixAll.printObjectProperties()方法内部实现,如果第一个log参数是null的话,不会做任何事情,是不是应该把配置参数打印在控制台上
was:
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:
{quote}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);
}{quote}
如果参数含有-p的话,走入这个分支,但是MixAll.printObjectProperties()方法内部实现,如果第一个log参数是null的话,不会做任何事情,是不是应该把配置参数打印在控制台上
> some no working code
> --------------------
>
> Key: ROCKETMQ-262
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-262
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-namesrv
> Affects Versions: 4.1.0-incubating
> Reporter: yzh
> Assignee: Xiaorui Wang
> Priority: Trivial
> Attachments: NamesrvStartup.java
>
>
> 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:
> {code:java}
> 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);
> }
> {code}
> 如果参数含有-p的话,走入这个分支,但是MixAll.printObjectProperties()方法内部实现,如果第一个log参数是null的话,不会做任何事情,是不是应该把配置参数打印在控制台上
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)