On Tue, 26 Sep 2023 18:44:01 GMT, Paul Sandoz <psan...@openjdk.org> wrote:

>> Jorn Vernee has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   fix typos
>
> src/java.base/share/classes/java/lang/Module.java line 328:
> 
>> 326:                 System.err.printf("""
>> 327:                         WARNING: A restricted method in %s has been 
>> called
>> 328:                         WARNING: %s has been called%s in %s
> 
> Suggestion:
> 
>                         WARNING: %s has been called by %s in %s
> 
> ?

The current code does the right thing, since in some cases the caller is `null` 
and the second `%s` should expand to an empty string. So  in the `caller == 
null` case, the message becomes:

    Class::method has been called in an unnamed module

There was also an offline suggestion to change it to:

    Class::method has been called by code in an unnamed module
    
Which I think is a good idea.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15103#discussion_r1337902449

Reply via email to