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

java.util.regex: make Matcher interruptible

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      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 .

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: