Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6988218

RegEx matcher loops

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 6u21
    • core-libs
    • b119
    • x86
    • windows_2008

      FULL PRODUCT VERSION :
      java version "1.6.0_21"
      Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
      Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.0.6002]

      A DESCRIPTION OF THE PROBLEM :
      Java RegEx matcher loops on a special RegEx.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the sample program.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
        Program should finish.
      ACTUAL -
      Progam loops, does not finish.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
          Pattern pattern = Pattern.compile("^([+-]?((0[xX](\\p{XDigit}+))|(((\\p{Digit}+)(\\.)?((\\p{Digit}+)?)([eE][+-]?(\\p{Digit}+))?)|(\\.((\\p{Digit}+))([eE][+-]?(\\p{Digit}+))?)))|[n|N]?'([^']*(?:'')*[^']*)*')");
          Matcher matcher = pattern.matcher("'%)) order by ANGEBOT.ID");
          matcher.find();
      ---------- END SOURCE ----------

            sherman Xueming Shen
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: