RFR: 8210832: Remove sneaky locking in class Monitor

Daniel D. Daugherty daniel.daugherty at oracle.com
Wed Jan 30 14:46:33 UTC 2019


Trimming to respond to one comment...

On 1/30/19 2:29 AM, David Holmes wrote:
> Nit:
>
> assert(_owner == Thread::current(), "should be equal: owner=" 
> INTPTR_FORMAT
>                    ", self=" INTPTR_FORMAT, p2i(_owner), 
> p2i(Thread::current()));
>
> with Dan's enhanced assertions there's an indentation issue. The 
> second line should indent to the first comma, but that will make the 
> second line extend way past 80 columns.

I don't think I've seen an indent to the first comma before...
I would indent this as:


   assert(_owner == Thread::current(), "should be equal: owner=" 
INTPTR_FORMAT
          ", self=" INTPTR_FORMAT, p2i(_owner), p2i(Thread::current()));

or

   assert(_owner == Thread::current(),
          "should be equal: owner=" INTPTR_FORMAT ", self=" INTPTR_FORMAT,
          p2i(_owner), p2i(Thread::current()));

if you want all of the format string together...

Dan


More information about the hotspot-dev mailing list