Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1592

The random number generated by RandomUtils exceeds the exclusive parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.11
    • 3.12.0
    • lang.*
    • None

    Description

      @Test
      public void test() {
          while (RandomUtils.nextLong(12900000000001L, 12900000000016L) != 12900000000016L) {
      
          }
          System.out.println("should not be invoked");
      }
      

      Attachments

        1. image-2020-07-21-14-35-27-870.png
          155 kB
          huang pingcai

        Activity

          People

            aherbert Alex Herbert
            pingcai huang pingcai
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 40m
                40m