[jira] [Updated] (AVRO-1633) Add additional setXxx(Builder) method to make user code more readable.
[ https://issues.apache.org/jira/browse/AVRO-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom White updated AVRO-1633: Fix Version/s: (was: 1.8.0) > Add additional setXxx(Builder) method to make user code more readable. > -- > > Key: AVRO-1633 > URL: https://issues.apache.org/jira/browse/AVRO-1633 > Project: Avro > Issue Type: Improvement > Components: java >Affects Versions: 1.8.0 >Reporter: Niels Basjes >Assignee: Niels Basjes > Attachments: AVRO-1633-2015-01-20-v1.patch > > > The currently generated code contains these two methods for the Builder > instances (code sample was simplified): > {code}public Request.Builder setConnection(NetworkConnection value) > public Request.Builder setConnectionBuilder(NetworkConnection.Builder > value){code} > My proposal: Add in addition the method: > {code}public Request.Builder setConnection(NetworkConnection.Builder > value){code} > Advantage: > * You can do {{.setConnection(something)}} and pass either a > {{NetworkConnection}} or a {{NetworkConnection.Builder}}. > * User code becomes a bit more readable. > Disadvantages: > * Explicitly setting a {{null}} will trigger a "Multiple implementations" > error and as such will need an explicit typecast. > ** _This may be considered breaking backward compatibility!_ > To solve this you must do either this: > {code}.setConnection((NetworkConnection)null){code} > or this {code} > NetworkConnection nc = null; > ... > .setConnection(nc){code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (AVRO-1633) Add additional setXxx(Builder) method to make user code more readable.
[ https://issues.apache.org/jira/browse/AVRO-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Basjes updated AVRO-1633: --- Resolution: Won't Fix Status: Resolved (was: Patch Available) Add additional setXxx(Builder) method to make user code more readable. -- Key: AVRO-1633 URL: https://issues.apache.org/jira/browse/AVRO-1633 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.8.0 Reporter: Niels Basjes Assignee: Niels Basjes Fix For: 1.8.0 Attachments: AVRO-1633-2015-01-20-v1.patch The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: * You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. * User code becomes a bit more readable. Disadvantages: * Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. ** _This may be considered breaking backward compatibility!_ To solve this you must do either this: {code}.setConnection((NetworkConnection)null){code} or this {code} NetworkConnection nc = null; ... .setConnection(nc){code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (AVRO-1633) Add additional setXxx(Builder) method to make user code more readable.
[ https://issues.apache.org/jira/browse/AVRO-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Basjes updated AVRO-1633: --- Description: The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. Disadvantage: Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. This may be considered breaking backward compatibility! was: The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. Disadvantage: Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. Add additional setXxx(Builder) method to make user code more readable. -- Key: AVRO-1633 URL: https://issues.apache.org/jira/browse/AVRO-1633 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.8.0 Reporter: Niels Basjes Assignee: Niels Basjes Fix For: 1.8.0 Attachments: AVRO-1633-2015-01-20-v1.patch The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. Disadvantage: Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. This may be considered breaking backward compatibility! -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (AVRO-1633) Add additional setXxx(Builder) method to make user code more readable.
[ https://issues.apache.org/jira/browse/AVRO-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Basjes updated AVRO-1633: --- Description: The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: * You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. * User code becomes a bit more readable. Disadvantages: * Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. ** _This may be considered breaking backward compatibility!_ To solve this you must do either this: {code}.setConnection((NetworkConnection)null){code} or this {code} NetworkConnection nc = null; ... .setConnection(nc){code} was: The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. Disadvantage: Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. This may be considered breaking backward compatibility! Add additional setXxx(Builder) method to make user code more readable. -- Key: AVRO-1633 URL: https://issues.apache.org/jira/browse/AVRO-1633 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.8.0 Reporter: Niels Basjes Assignee: Niels Basjes Fix For: 1.8.0 Attachments: AVRO-1633-2015-01-20-v1.patch The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: * You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. * User code becomes a bit more readable. Disadvantages: * Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. ** _This may be considered breaking backward compatibility!_ To solve this you must do either this: {code}.setConnection((NetworkConnection)null){code} or this {code} NetworkConnection nc = null; ... .setConnection(nc){code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (AVRO-1633) Add additional setXxx(Builder) method to make user code more readable.
[ https://issues.apache.org/jira/browse/AVRO-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Basjes updated AVRO-1633: --- Status: Patch Available (was: Open) Hi [~cutting], Please classify this as either _wanted_ or _unwanted_ because of this backward compatibility point when setting a 'null' directly. Thanks. Add additional setXxx(Builder) method to make user code more readable. -- Key: AVRO-1633 URL: https://issues.apache.org/jira/browse/AVRO-1633 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.8.0 Reporter: Niels Basjes Assignee: Niels Basjes Fix For: 1.8.0 Attachments: AVRO-1633-2015-01-20-v1.patch The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: * You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. * User code becomes a bit more readable. Disadvantages: * Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. ** _This may be considered breaking backward compatibility!_ To solve this you must do either this: {code}.setConnection((NetworkConnection)null){code} or this {code} NetworkConnection nc = null; ... .setConnection(nc){code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (AVRO-1633) Add additional setXxx(Builder) method to make user code more readable.
[ https://issues.apache.org/jira/browse/AVRO-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Basjes updated AVRO-1633: --- Attachment: AVRO-1633-2015-01-20-v1.patch The patch that implements the proposal. Add additional setXxx(Builder) method to make user code more readable. -- Key: AVRO-1633 URL: https://issues.apache.org/jira/browse/AVRO-1633 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.8.0 Reporter: Niels Basjes Assignee: Niels Basjes Fix For: 1.8.0 Attachments: AVRO-1633-2015-01-20-v1.patch The currently generated code contains these two methods for the Builder instances (code sample was simplified): {code}public Request.Builder setConnection(NetworkConnection value) public Request.Builder setConnectionBuilder(NetworkConnection.Builder value){code} My proposal: Add in addition the method: {code}public Request.Builder setConnection(NetworkConnection.Builder value){code} Advantage: You can do {{.setConnection(something)}} and pass either a {{NetworkConnection}} or a {{NetworkConnection.Builder}}. Disadvantage: Explicitly setting a {{null}} will trigger a Multiple implementations error and as such will need an explicit typecast. -- This message was sent by Atlassian JIRA (v6.3.4#6332)