RFR: 8164708: String.prototype.replace replaces empty match twice

Hannes Wallnöfer hannes.wallnoefer at oracle.com
Fri Oct 21 15:21:12 UTC 2016


Please review:

Bug: https://bugs.openjdk.java.net/browse/JDK-8164708
Webrev: http://cr.openjdk.java.net/~hannesw/8164708/webrev/

We need to always advance the index of a global replace if previous match string was empty. It seems like this is a spec bug in ES5 that was fixed in ES6.

Thanks,
Hannes


More information about the nashorn-dev mailing list