You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2010/06/17 20:46:25 UTC
[jira] Created: (AVRO-582) java: add comment to generated code
warning not to call set & get
java: add comment to generated code warning not to call set & get
-----------------------------------------------------------------
Key: AVRO-582
URL: https://issues.apache.org/jira/browse/AVRO-582
Project: Avro
Issue Type: Improvement
Components: java
Reporter: Doug Cutting
Assignee: Doug Cutting
Fix For: 1.4.0
Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AVRO-582) java: add comment to generated code
warning not to call set & get
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-582:
------------------------------
Attachment: AVRO-582.patch
Here's a patch for this.
> java: add comment to generated code warning not to call set & get
> -----------------------------------------------------------------
>
> Key: AVRO-582
> URL: https://issues.apache.org/jira/browse/AVRO-582
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
> Attachments: AVRO-582.patch
>
>
> Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AVRO-582) java: add comment to generated code
warning not to call set & get
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-582:
------------------------------
Status: Resolved (was: Patch Available)
Hadoop Flags: [Reviewed]
Resolution: Fixed
Thanks for the review, Scott. I just committed this.
> java: add comment to generated code warning not to call set & get
> -----------------------------------------------------------------
>
> Key: AVRO-582
> URL: https://issues.apache.org/jira/browse/AVRO-582
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
> Attachments: AVRO-582.patch
>
>
> Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-582) java: add comment to generated code
warning not to call set & get
Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879953#action_12879953 ]
Philip Zeyliger commented on AVRO-582:
--------------------------------------
+1 to Javadoc, but do we have flexibility to rename them? Java APIs are riddled with gets and sets, whereas this is more like readInternal, writeInternal or something.
> java: add comment to generated code warning not to call set & get
> -----------------------------------------------------------------
>
> Key: AVRO-582
> URL: https://issues.apache.org/jira/browse/AVRO-582
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
>
> Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-582) java: add comment to generated code
warning not to call set & get
Posted by "Scott Carey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891351#action_12891351 ]
Scott Carey commented on AVRO-582:
----------------------------------
+1 looks good
> java: add comment to generated code warning not to call set & get
> -----------------------------------------------------------------
>
> Key: AVRO-582
> URL: https://issues.apache.org/jira/browse/AVRO-582
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
> Attachments: AVRO-582.patch
>
>
> Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-582) java: add comment to generated code
warning not to call set & get
Posted by "Scott Carey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880029#action_12880029 ]
Scott Carey commented on AVRO-582:
----------------------------------
bq. do we have flexibility to rename them? Java APIs are riddled with gets and sets, whereas this is more like readInternal, writeInternal or something.
Good idea. Later we likely want to 'bean-ify' these with getters and setters, and these keywords should be reserved for that purpose. Unfortunately that is part of the IndexedRecord interface, so has a somewhat broader impact. internalGet and internalSet might also be reasonable names for this.
> java: add comment to generated code warning not to call set & get
> -----------------------------------------------------------------
>
> Key: AVRO-582
> URL: https://issues.apache.org/jira/browse/AVRO-582
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
>
> Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AVRO-582) java: add comment to generated code
warning not to call set & get
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-582:
------------------------------
Status: Patch Available (was: Open)
> java: add comment to generated code warning not to call set & get
> -----------------------------------------------------------------
>
> Key: AVRO-582
> URL: https://issues.apache.org/jira/browse/AVRO-582
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
> Attachments: AVRO-582.patch
>
>
> Java's specific compiler generates classes with set(int, Object) and get(int) methods, used by the DatumReader and DatumWriter implementations to read and write instances. These methods are not intended for users to call, but must be public. We should add a comment to the generated code indicating this, to reduce confusion.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.