Jaskey Lam created ROCKETMQ-215:
-----------------------------------
Summary: Use java 7 syntax to refator code base
Key: ROCKETMQ-215
URL: https://issues.apache.org/jira/browse/ROCKETMQ-215
Project: Apache RocketMQ
Issue Type: Improvement
Components: rocketmq-broker, rocketmq-client, rocketmq-commons,
rocketmq-namesrv, rocketmq-remoting, rocketmq-store, rocketmq-tools
Reporter: Jaskey Lam
Assignee: yukon
Priority: Minor
code base may have some code like
{code}
private ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer,
Long>> offsetTable =
new ConcurrentHashMap<String, ConcurrentMap<Integer, Long>>(512);
{code}
Atucally, with java7, it can be simplied to
{code}
private ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer,
Long>> offsetTable =
new ConcurrentHashMap<>(512);
{code}
Which is cleaner.
Since rocketmq require jdk which is greater or higher than java7, this can be
improved.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)