RFR - JDK-8223775 String::stripIndent (Preview)
Brent Christian
brent.christian at oracle.com
Thu May 23 19:39:30 UTC 2019
Hi,
I have a couple questions/comments about the special treatment of the
last line in a text block.
--
In the CSR we have:
"3. If the last line in the list of individual lines (i.e., the line
with the text block closing delimiter) is blank, then add it to the set
of determining lines. (The indentation of the closing delimiter should
influence the indentation of the content as a whole -- a "significant
trailing line" policy.)"
Doesn't this mean that the last line will *always* be included in the
set of determining lines (if it's blank, and also if it's not blank) ?
That could be stated more clearly.
--
Given that, one could put the closing delimiter at the beginning of a
line to prevent any indent stripping, e.g.:
.............. </body>
..............</html>
""";
(I guess this is what 'optOut' is for in the webrev.)
Is it worth pointing out this possible usage more clearly? (Or perhaps
it's not expected to be used very often.)
Thanks,
-Brent
More information about the compiler-dev
mailing list