Missing increment of local counter variable
p.tournaris at gmail.com
Fri Dec 29 22:16:14 UTC 2017
Nope, just saw that on the diff. Have not actually found an incorrect
behaviour on an example!
Thanks for filing it!
On Sat, Dec 30, 2017 at 12:12 AM, Liam Miller-Cushon <cushon at google.com>
> Thanks for pointing that out. It was an oversight, I filed
> I don't think it's a regression, though. That branch is only taken for
> synthetic methods. They aren't visible during annotation processing, and
> their parameter names don't appear in bytecode, so it shouldn't be possible
> to observe the incorrect names.
> If you saw this causing incorrect behaviour, can you share a complete
> On Fri, Dec 29, 2017 at 12:23 PM, Παύλος-Πέτρος Τουρνάρης <
> p.tournaris at gmail.com> wrote:
>> Hello everyone,
>> First time posting here :)
>> Stumbled upon a javac diff -> http://hg.openjdk.java.net/
>> jdk/jdk/rev/89f6aa26fd6c resolving https://bugs.openjdk
>> .java.net/browse/JDK-8177486 & https://bugs.openjdk.java.ne
>> t/browse/JDK-8007720 and noticed that the previous implementation was
>> using a local counter variable named `i` when looping through the parameter
>> types, in order to construct the parameter name. The new implementation
>> follows a similar path to construct the parameter name, using the `i` local
>> counter variable but it does not increment it.
>> The method I am referring to is the `params()` in Symbol.java
>> and I think it should include an increment of `i` in line
>> Otherwise http://hg.openjdk.java.net/jdk/jdk/file/89f6aa26fd
>> code/Symbol.java#l1889 on that line the `fromString("arg" + i)` will
>> always be called with `i` being 0 (zero).
>> Not sure If I can submit a patch, or how it works in general, but I was
>> suggested to report it in this list :)
>> Thank you for your time!
>> Pavlos-Petros Tournaris
>> Android Software Engineer @ Workable <http://workable.com/>
Android Software Engineer @ Workable <http://workable.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the compiler-dev