Uploaded image for project: 'Commons Text'
  1. Commons Text
  2. TEXT-152

infinite loop in WordUtils.wrap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.7
    • 1.7
    • None
    • Important

    Description

      this infinite loop can be reproduced with this unit test:

       

      @Test
      public void testWrapAtStartAndEnd() {
          assertThat(WordUtils.wrap("nabcdefabcdefn", 2, "\n", false, "(?=n)")).isEqualTo("\nabcdefabcdef\n");
      }
      

      Attachments

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              CAPS50 Carlos
              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 - 2h 20m
                  2h 20m