On Mon, 1 Aug 2022 17:36:52 GMT, Phil Race <p...@openjdk.org> wrote:

>> @prrace Then I will proceed by removing Stackwalker and create a graphics 
>> instance only if its `null`.
>
> No, because that won't work, or more precisely will be a waste of work.
> See
> DebugGraphics(Graphics graphics) {
> this(); // << no-args constructor and graphics will still be null
> this.graphics = null;
> }
> 
> graphics will ALWAYS be null when you come via here which is exactly why we 
> needed StackWalker

Ok, then we should set graphics only If the no-args constructor is called by 
another program and not via by the same class.

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

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

Reply via email to