Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-10150 Upgrade to Spotbugs 4
  3. HDDS-10151

Random object created and used only once

    XMLWordPrintableJSON

Details

    Description

      Replace single-use Random objects by RandomUtils or similar.

      Example:

      -      int index = new Random().nextInt(dnInfos.size());
      +      int index = RandomUtils.nextInt(0, dnInfos.size());
      

      See attached file for list of items to fix.

      Attachments

        1. HDDS-10151.txt
          5 kB
          Attila Doroszlai

        Issue Links

          Activity

            People

              wxiao Will Xiao
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: