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

Nashorn: Multiple RegExp#ignoreCase issues

    XMLWordPrintable

Details

    • b17
    • generic
    • linux_ubuntu

    Backports

      Description

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        Nashorn version: hg tip 18edd7a1b166

        The implementation for case-insensitive regular expressions does not comply to [ES5.1 - 15.10.2.8 Canonicalize]. This applies to both implementations, java.util.regex and Joni.

        I've noticed this while working on integrating Joni for my project. You should be able to port the necessary changes from here [1]:
        - UCS2Encoding.java contains the relevant changes for runtime.regexp.joni.EncodingHelper
        - RegExpParser.java#L1256-L1412 contains the relevant changes for the java.util.regex based implementation

        [1] https://github.com/anba/es6draft/tree/master/src/main/java/com/github/anba/es6draft/regexp

        ADDITIONAL REGRESSION INFORMATION:
        Java(TM) SE Runtime Environment (build 1.8.0-ea-b119)
        Java HotSpot(TM) 64-Bit Server VM (build 25.0-b61, mixed mode)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Test cases:

        jjs> /[\u2160]/i.test("\u2170")

        Expected: true
        Actual: false


        jjs> /\u0130/i.test("\u0069")

        Expected: false
        Actual: true


        jjs> /\u1e9e/i.test("\u00df")

        Expected: false
        Actual: true


        jjs> /\u0345{4}/i.test("\u0345\u0399\u03b9\u1fbe")

        Expected: true
        Actual: false


        REPRODUCIBILITY :
        This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

                hannesw Hannes Wallnoefer
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: