[ https://issues.apache.org/jira/browse/ROCKETMQ-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040587#comment-16040587 ]
ASF GitHub Bot commented on ROCKETMQ-215: ----------------------------------------- Github user Jaskey commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/117#discussion_r120577661 --- Diff: tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java --- @@ -113,7 +113,7 @@ private void printClusterMoreStats(final DefaultMQAdminExt defaultMQAdminExt) th while (itCluster.hasNext()) { Map.Entry<String, Set<String>> next = itCluster.next(); String clusterName = next.getKey(); - TreeSet<String> brokerNameSet = new TreeSet<String>(); --- End diff -- @dongeforever Do we still need to make rocketmq-tools be compatible with jdk1.6? If yes, we can not do the changes in rocketmq-tools module. > 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-namesrv, rocketmq-store > 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 broker require jdk which is greater or higher than java7, this > can be improved. > But rocketmq client should still remains compatible with jdk 1.6 -- This message was sent by Atlassian JIRA (v6.3.15#6346)