RFR - JDK-8210674 - Need to add examples for use of javac properties introduced by Raw String Literals

Jim Laskey james.laskey at oracle.com
Thu Sep 13 13:27:41 UTC 2018


As per suggestions, I have reduced to


// key: compiler.err.unicode.backtick
// key: compiler.misc.feature.raw.string.literals
// key: compiler.warn.preview.feature.use.plural
// options: --enable-preview -source 12 -Xlint:preview

class RawStringLiteral {
    String m() {
        return `abc` + \u0060`def`;
    }
}

Which will reduce to two messages once out of preview.


> On Sep 12, 2018, at 6:53 PM, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
> 
> In general, it would be bad style to have one example serving multiple diagnostics, since that often implies that the example is not as simple as it could be for any one message.
> 
> This example is borderline, because some of the messages will go away if and when Raw String Literals gets promoted from being a preview feature to an official feature.
> 
> -- Jon
> 
> On 9/12/18 2:45 PM, Vicente Romero wrote:
>> Hi Jim,
>> 
>> Looks good but as a suggestion you can fold both examples into one,
>> 
>> Thanks,
>> Vicente
>> 
>> On 09/12/2018 05:01 PM, Jim Laskey wrote:
>>> Please review the following misstep;
>>> 
>>> webrev: http://cr.openjdk.java.net/~jlaskey/8210674/webrev/index.html
>>> jbs: https://bugs.openjdk.java.net/browse/JDK-8210674
>>> 
>>> Cheers,
>>> 
>>> — Jim
>>> 
>>> 
>> 
> 



More information about the compiler-dev mailing list