Rebased pull 16537

Constant value made a val to avoid unnecessary allocation
Parameter made by-name since it's not always used and allocates a lot of char[] and stringbuffers, often unnecessary