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

java.util.regex: make Matcher interruptible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 7
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      Regular expressions might take very long to finish (as described in Bug ID: 5026912).
       
      But 'interrupt()' does not stop a thread that executes the regular expression.
      You have to use the deprecated(!) 'stop()' method on that thread.

      A solution might be to add checks for 'Thread.isInterrupted()' in loops to stop
      - backtracking of long running regular expressions
      - reading characters from the input text
      - etc.

      [I tried to put 'Thread.isInterrupted()' in all 'while' and 'for' loops. It works fine, but might be too much.]

      JUSTIFICATION :
      'interrupt()' does not stop a thread that executes the regular expression
      'stop()' method on that thread is deprecated .

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: