RFR: CODETOOLS-7901416 Fix incorrect awk substr indexing in webrev

Daniel Fuchs daniel.fuchs at oracle.com
Wed May 6 09:16:05 UTC 2015


On 05/05/15 23:46, Magnus Ihse Bursie wrote:
> There are several cases of calls to the substr function in awk
> expressions in webrev, that assume 0 is the first position in the string.
>
> According to awk syntax, strings are 1-indexed. However, several awk
> implementations treat the incorrect 0 as an 1. Not so for mawk, which is
> the default awk implementation on Ubuntu.
>
> Bug: https://bugs.openjdk.java.net/browse/CODETOOLS-7901416
> WebRev:
> http://cr.openjdk.java.net/~ihse/CODETOOLS-7901416-fix-awk-substr-to-1/webrev.01

Looks good to me Magnus.

Thanks for catching that. This substr syntax in awk has already
given me pain in the head when I ported webrev from 'forest' to
'trees'.

I have imported your patch and tested it on a few repos I have,
including one test repo that has renames and new files and deleted
files - and webrev is still working :-)

Not a Reviewer for CODETOOLS though.


best regards,

-- daniel

>
>
> /Magnus
>



More information about the webrev-dev mailing list