You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Niels Basjes (JIRA)" <ji...@apache.org> on 2015/01/14 16:10:35 UTC
[jira] [Updated] (AVRO-1630) Creating Builder from instance loses
data
[ https://issues.apache.org/jira/browse/AVRO-1630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niels Basjes updated AVRO-1630:
-------------------------------
Attachment: AVRO-1630-2015-01-14-v1.patch
This fix changes the getXxxBuilder method from this
{code}
public org.apache.avro.test.http.NetworkConnection.Builder getConnectionBuilder() {
if (connectionBuilder == null) {
setConnectionBuilder(org.apache.avro.test.http.NetworkConnection.newBuilder());
}
return connectionBuilder;
}
{code}
into this
{code}
public org.apache.avro.test.http.NetworkConnection.Builder getConnectionBuilder() {
if (connectionBuilder == null) {
if (hasConnection()) {
setConnectionBuilder(org.apache.avro.test.http.NetworkConnection.newBuilder(connection));
} else {
setConnectionBuilder(org.apache.avro.test.http.NetworkConnection.newBuilder());
}
}
return connectionBuilder;
}
{code}
> Creating Builder from instance loses data
> -----------------------------------------
>
> Key: AVRO-1630
> URL: https://issues.apache.org/jira/browse/AVRO-1630
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.8.0
> Reporter: Niels Basjes
> Assignee: Niels Basjes
> Fix For: 1.8.0
>
> Attachments: AVRO-1630-2015-01-14-v1.patch
>
>
> If you create a builder from an instance and then use the .getXxxBuilder() method you get an empty builder instead of a builder than contains the data elements from the original instance.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)