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

Use java 7 syntax to refator code base

    XMLWordPrintableJSON

Details

    Description

      code base may have some code like

          private ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer, Long>> offsetTable =
              new ConcurrentHashMap<String, ConcurrentMap<Integer, Long>>(512);
      
      

      Atucally, with java7, it can be simplied to

          private ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer, Long>> offsetTable =
              new ConcurrentHashMap<>(512);
      
      

      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

      Attachments

        Issue Links

          Activity

            People

              yukon Xinyu Zhou
              Jaskey Jaskey Lam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: