You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/27 04:00:03 UTC

[jira] [Work logged] (BEAM-6293) Create automatic schema registration for AutoValue classes.

     [ https://issues.apache.org/jira/browse/BEAM-6293?focusedWorklogId=602715&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-602715 ]

ASF GitHub Bot logged work on BEAM-6293:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/May/21 03:59
            Start Date: 27/May/21 03:59
    Worklog Time Spent: 10m 
      Work Description: 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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 602715)
    Time Spent: 50m  (was: 40m)

> Create automatic schema registration for AutoValue classes.
> -----------------------------------------------------------
>
>                 Key: BEAM-6293
>                 URL: https://issues.apache.org/jira/browse/BEAM-6293
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: P2
>              Labels: Done
>             Fix For: 2.10.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)