anirudh-acharya commented on pull request #7334:
URL: https://github.com/apache/beam/pull/7334#issuecomment-849300188
> @reuvenlax I was playing around with this PR, one thing I've noticed is
that `ReflectUtils#isGetter` seems to be too strict. It requires getter method
names to start with `get` and filters out this style of AutoValue classes:
>
> ```java
> @AutoValue
> public abstract class Foo {
> public abstract String bar();
> }
> ```
>
> What do you think about relaxing this constraint?
Thank you for this ! I was facing this issue where the created object has
all the fields as null, since it is not able to find the right fields to set
to. Changing the AutoValue field names to get* convention fixed the issue.
@reuvenlax FWIW, I have followed AutoValue examples of property names as the
getters, e.g. field(), instead of getField(), and using the first convention
led me to the issue mentioned above. I'd expect the JavaBean classes to follow
get/set prefixs, just because that is prevalent. Until we make a decision to
support either of the conventions, should we document this behavior in the
JavaDoc for AutoValueSchema? I know that's the first place I looked for clues
on what's going on. Thanks and let me know if I can help with that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]