On Wed, 23 Nov 2022 15:57:54 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Kind of blows the whole concept of embedded expressions. This is one of 
>> those, just because you can, doesn't mean you should.
>
> ok, still what is the behavior if the format includes an index?
> The pattern scanner in FormatProcessor permits an index and does not cause an 
> error.
> 
> Also, there might be a small benefit to using the existing compiled pattern 
> in Formatter.java.  (make it package private and rename to uppercase).

Currently it issues an `MissingFormatArgumentException` which I guess could be 
confusing.  Changing to IllegalFormatFlagsException with a descriptive message.

Re: Pattern - I was originally trying to minimize changes to Formatter, but 
considering what I did change...

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

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

Reply via email to