RFR: 7903711: Rewrite simple methods ANC plugin to classfile API [v2]
Alexandre Iline
shurailine at openjdk.org
Mon Apr 15 18:46:00 UTC 2024
On Fri, 12 Apr 2024 21:05:33 GMT, Leonid Kuskov <lkuskov at openjdk.org> wrote:
>> Alexandre Iline has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Missing LDC instructions
>
> plugins/simple_methods_anc/src/openjdk/jcov/filter/simplemethods/EmptyMethods.java line 38:
>
>> 36: public boolean test(ClassModel node, MethodModel m) {
>> 37: if (m.code().isPresent()) {
>> 38: var next = new InstructionIterator(m.code().get()).next(i -> !isSimpleInstruction(i.opcode()));
>
> Bad practice to use var in "shared" projects except tests - a human isn't javac, for readability it would be much better to see a type of the result.
I am happy to follow any coding guidelines. Was there an update to the openjdk guidelines in regards to the new language features? This code uses multiple new language features, I do not immediately see why "var" should be an exception.
-------------
PR Review Comment: https://git.openjdk.org/jcov/pull/44#discussion_r1566280111
More information about the jcov-dev
mailing list