On Tue, 17 Jan 2023 10:20:43 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> src/java.base/share/classes/java/util/regex/Pattern.java line 1099:
>> 
>>> 1097:      * flags.
>>> 1098:      *
>>> 1099:      * <p>Setting {@link #CANON_EQ} among the flags may impose a 
>>> moderate risk
>> 
>> This may be a candidate for `@apiNote`, same thing for the note added to 
>> CANON_EQ.
>
> The choice of a `<p>` paragraph rather than `@apiNote` is for consistency 
> with similar commentary paragraphs in the specs of `CASE_INSENSITIVE`, 
> `UNICODE_CASE`, and `UNICODE_CHARACTER_CLASS`.
> 
> I have no problems in using `@apiNote` instead, but then it would be better 
> to apply the same for the other mentioned flags as well.

Okay, I see your point and to use apiNote consistently would require 
"converting" some of the existing text to apiNote too.

I'm still mulling over Pattern.compile throwing OOME. An implNote is probably 
the right category for this, in which case it can start with "In the the JDK 
Reference Implementation ...".  I assume the static Pattern.matches needs same, 
and also Pattern.matcher for the lazy compilation case.

-------------

PR: https://git.openjdk.org/jdk/pull/12027

Reply via email to