On 7/12/2020 9:12 pm, Per Liden wrote:
On Mon, 7 Dec 2020 05:10:34 GMT, David Holmes <dhol...@openjdk.org> wrote:
584: jobject strongRef;
585:
586: strongRef = strengthenNode(env, node);
This can just be one line.
I was actually trying to carefully to follow the coding style currently used in
this file/library. If you have a quick look at this file you'll see the pattern
above in multiple places, where as combined declaration+assignment style isn't
used. So while I personally agree about this style question, I also think
following the style already present in a file has precedence over introducing a
new style. Don't you agree?
This file uses an archaic C-style, so while I agree it would be
inappropriate to over modernise the new code, this particular example
stuck out because even in archaic C there is no reason to split this
onto two lines. I didn't go looking to see if this mimicked existing
code. :) Keep it or change it as you see fit.
Cheers,
David
-------------
PR: https://git.openjdk.java.net/jdk/pull/1595