Uploaded image for project: 'Apache InLong'
  1. Apache InLong
  2. INLONG-102

Fix question [TUBEMQ-101] [Optimize code]

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.5.0
    • None

    Description

      Because the core module uses jdk1.7, this code cannot use 'putIfAbsent'

      addrMap4Failover.putIfAbsent(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo);
      

      We should use the original

      if (addrMap4Failover.get(tmpNodeAddrInfo.getHostPortStr()) == null) {
          addrMap4Failover.put(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo);
      }
      

       

      Attachments

        Activity

          People

            viviel viviel
            viviel viviel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m