google / auto

A collection of source code generators for Java.
Apache License 2.0
10.43k stars 1.2k forks source link

AutoValue: Inconsistent removal of consumed properties #327

Closed gabrielittner closed 8 years ago

gabrielittner commented 8 years ago

The removal for AutoValue itself compares the returned property names with the method name (AutoValueProcessor.java#L391), while the removal for extensions (AutoValueProcessor.java#L440) compares it with the property key. Those two aren't the same when the methods are prefixed with get.

It's easy to workaround that by just returning both in consumeProperties(Context).

eamonnmcmanus commented 8 years ago

I've rewritten this code substantially in the latest version, which hasn't been pushed to github yet. I believe it will behave correctly regardless of whether properties are prefixed or not. I'll ping this issue once that code is live so that you can confirm that the problem you are seeing has been fixed.

gabrielittner commented 8 years ago

It's fixed in the latest snapshot 👍