On Fri, 6 Oct 2023 18:07:37 GMT, Justin Lu <j...@openjdk.org> wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8317630) >> which makes the implications of overriding _ChoiceFormat::applyPattern_ and >> _MessageFormat::applyPattern_ apparent by adding a implSpec tag to the >> method. >> >> That is, the constructors of both ChoiceFormat and MessageFormat call the >> public and non-final applyPattern method; any changes in the applyPattern of >> a subclass will be reflected in the constructors as well. > > Justin Lu has updated the pull request incrementally with one additional > commit since the last revision: > > tag setChoices as well
I assume this issue was filed (directly or indirectly) in response to the javac lint warning added in JDK 21 under JDK-8015831. I recommend considering how to address the underlying issue of the constructors calling overridable methods. For example, can a private method be defined that is called from the constructor and the public method? In any case, I think one goal of bug should be to remove the warning condition, preferably by removing the condition, but, if not, by adding a `@SuppressedException((this-escape")`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16064#issuecomment-1776523348