[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2018-12-10 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715625#comment-16715625
 ] 

ASF subversion and git services commented on AVRO-2069:
---

Commit e65411f5cce2d58588fbb96a366560f6e6803dab in avro's branch 
refs/heads/master from [~dkulp]
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e65411f ]

Squashed commit of the following:
This closes #243

commit b2a5607578652f203e117c5b80d228618dd101f1
Merge: 500c28c2 54fc3f53
Author: Daniel Kulp 
Date:   Mon Dec 3 14:46:47 2018 -0500

Merge branch 'master' into master

commit 500c28c212d20e40fe48b6229cfc7764631f56e8
Author: Daniil Guitelson 
Date:   Fri Sep 1 17:37:10 2017 +0300

AVRO-2069: Use primitive fields in generated getters & setters in Java code

Fix broken unit tests in TestSpecificCompilerTool after migrating to 
org.junit.Test

commit 35b891ebf868cea12f278641229807c1e2a35db2
Merge: c642adaf 189368ed
Author: Daniil Gitelson 
Date:   Fri Sep 1 17:33:13 2017 +0300

Merge pull request #1 from apache/master

Sync up with origin repository

commit c642adaf3d29183049cd4ad2e0012b002d95d7c6
Author: Daniil Guitelson 
Date:   Wed Aug 30 18:37:41 2017 +0300

AVRO-2069: Use primitive fields in generated getters & setters in Java code

Fix broken unit tests in TestSpecificCompilerTool

commit 3414eae643517591015e3a6154c726c31f2d3095
Author: Daniil Guitelson 
Date:   Tue Aug 29 12:13:42 2017 +0300

AVRO-2069: Use primitive fields in generated getters & setters in Java code


> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Apache Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>Priority: Major
> Fix For: 1.9.0
>
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715627#comment-16715627
 ] 

ASF GitHub Bot commented on AVRO-2069:
--

dkulp closed pull request #243: AVRO-2069: Use primitive fields in generated 
getters & setters in Java code
URL: https://github.com/apache/avro/pull/243
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
 
b/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
index 25b4101a6..f2e3bcfe4 100644
--- 
a/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
+++ 
b/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
@@ -228,7 +228,7 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
 #else   * @return The value of the '${this.mangle($field.name(), 
$schema.isError())}' field.
 #end
*/
-  public ${this.javaType($field.schema())} ${this.generateGetMethod($schema, 
$field)}() {
+  public ${this.javaUnbox($field.schema())} ${this.generateGetMethod($schema, 
$field)}() {
 return ${this.mangle($field.name(), $schema.isError())};
   }
 #end
@@ -252,7 +252,7 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
 #end
* @param value the value to set.
*/
-  public void ${this.generateSetMethod($schema, 
$field)}(${this.javaType($field.schema())} value) {
+  public void ${this.generateSetMethod($schema, 
$field)}(${this.javaUnbox($field.schema())} value) {
 this.${this.mangle($field.name(), $schema.isError())} = value;
   }
 #end
@@ -384,7 +384,7 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
 #end
   * @return The value.
   */
-public ${this.javaType($field.schema())} ${this.generateGetMethod($schema, 
$field)}() {
+public ${this.javaUnbox($field.schema())} 
${this.generateGetMethod($schema, $field)}() {
   return ${this.mangle($field.name(), $schema.isError())};
 }
 
diff --git 
a/lang/java/ipc/src/test/java/org/apache/avro/message/TestCustomSchemaStore.java
 
b/lang/java/ipc/src/test/java/org/apache/avro/message/TestCustomSchemaStore.java
index ba960442a..5de9d6a38 100644
--- 
a/lang/java/ipc/src/test/java/org/apache/avro/message/TestCustomSchemaStore.java
+++ 
b/lang/java/ipc/src/test/java/org/apache/avro/message/TestCustomSchemaStore.java
@@ -62,7 +62,7 @@ public void testCompatibleReadWithSchemaFromSchemaStore() 
throws Exception {
 // Should work
 assertEquals(nestedEvolve1.getRootName(), "RootName");
 assertEquals(nestedEvolve1.getNested().getName(), "Name");
-assertEquals(nestedEvolve1.getNested().getValue(), Long.valueOf(1));
+assertEquals(nestedEvolve1.getNested().getValue(), 1);
   }
 
   @Test(expected = MissingSchemaException.class)
diff --git 
a/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificRecordBuilder.java
 
b/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificRecordBuilder.java
index 4fa6fe0b7..1223e2325 100644
--- 
a/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificRecordBuilder.java
+++ 
b/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificRecordBuilder.java
@@ -47,7 +47,7 @@ public void testSpecificBuilder() {
 Assert.assertTrue(builder.hasName());
 Assert.assertEquals("James Gosling", builder.getName());
 Assert.assertTrue(builder.hasYearOfBirth());
-Assert.assertEquals(new Integer(1955), builder.getYearOfBirth());
+Assert.assertEquals(1955, builder.getYearOfBirth());
 Assert.assertFalse(builder.hasCountry());
 Assert.assertNull(builder.getCountry());
 Assert.assertTrue(builder.hasState());
@@ -102,13 +102,13 @@ public void testUnions() {
   .setProduct(product)
   .build())
   .build();
-Assert.assertEquals(datetime, p.getDatetime().longValue());
+Assert.assertEquals(datetime, p.getDatetime());
 Assert.assertEquals(ProductPage.class, p.getPageContext().getClass());
 Assert.assertEquals(product, 
((ProductPage)p.getPageContext()).getProduct());
 
 PageView p2 = PageView.newBuilder(p).build();
 
-Assert.assertEquals(datetime, p2.getDatetime().longValue());
+Assert.assertEquals(datetime, p2.getDatetime());
 Assert.assertEquals(ProductPage.class, p2.getPageContext().getClass());
 Assert.assertEquals(product, 
((ProductPage)p2.getPageContext()).getProduct());
 
@@ -141,10 +141,10 @@ public void testInterop() {
 Assert.assertEquals(interop.getArrayField(), 

[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2018-12-10 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715624#comment-16715624
 ] 

ASF subversion and git services commented on AVRO-2069:
---

Commit e65411f5cce2d58588fbb96a366560f6e6803dab in avro's branch 
refs/heads/master from [~dkulp]
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e65411f ]

Squashed commit of the following:
This closes #243

commit b2a5607578652f203e117c5b80d228618dd101f1
Merge: 500c28c2 54fc3f53
Author: Daniel Kulp 
Date:   Mon Dec 3 14:46:47 2018 -0500

Merge branch 'master' into master

commit 500c28c212d20e40fe48b6229cfc7764631f56e8
Author: Daniil Guitelson 
Date:   Fri Sep 1 17:37:10 2017 +0300

AVRO-2069: Use primitive fields in generated getters & setters in Java code

Fix broken unit tests in TestSpecificCompilerTool after migrating to 
org.junit.Test

commit 35b891ebf868cea12f278641229807c1e2a35db2
Merge: c642adaf 189368ed
Author: Daniil Gitelson 
Date:   Fri Sep 1 17:33:13 2017 +0300

Merge pull request #1 from apache/master

Sync up with origin repository

commit c642adaf3d29183049cd4ad2e0012b002d95d7c6
Author: Daniil Guitelson 
Date:   Wed Aug 30 18:37:41 2017 +0300

AVRO-2069: Use primitive fields in generated getters & setters in Java code

Fix broken unit tests in TestSpecificCompilerTool

commit 3414eae643517591015e3a6154c726c31f2d3095
Author: Daniil Guitelson 
Date:   Tue Aug 29 12:13:42 2017 +0300

AVRO-2069: Use primitive fields in generated getters & setters in Java code


> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Apache Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>Priority: Major
> Fix For: 1.9.0
>
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2018-03-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16409170#comment-16409170
 ] 

ASF GitHub Bot commented on AVRO-2069:
--

scottcarey commented on issue #243: AVRO-2069: Use primitive fields in 
generated getters & setters in Java code
URL: https://github.com/apache/avro/pull/243#issuecomment-375204378
 
 
   This can be an option at generation time for those that don't want to break 
compatibility (defaulting to the old way prior to 1.9). 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>Priority: Major
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-15 Thread Sean Busbey (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16167822#comment-16167822
 ] 

Sean Busbey commented on AVRO-2069:
---

I like this as the approach going forward, but this will be an incompatible 
change. Should we make a follow on jira to make a backwards compatible version 
for 1.8/1.7 (something like getUnboxedFieldName in addition to getFieldName).

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Nandor Kollar (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150660#comment-16150660
 ] 

Nandor Kollar commented on AVRO-2069:
-

Perfect, looks good, tests are green again, thanks!

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Daniil Gitelson (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150652#comment-16150652
 ] 

Daniil Gitelson commented on AVRO-2069:
---

[~nkollar], fixed.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Nandor Kollar (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150636#comment-16150636
 ] 

Nandor Kollar commented on AVRO-2069:
-

Ahhh, yes you're right, my bad, sorry for that! :)

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Daniil Gitelson (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150594#comment-16150594
 ] 

Daniil Gitelson commented on AVRO-2069:
---

[~nkollar], it is because recently you updated from legacy 
junit.framework.Assert to org.junit.Assert here: 
https://github.com/apache/avro/commit/189368ed485f5577528824dd88856991a51b6918 
:) Nice change! Those deprecations really annoys.
I will sync from master and fix this test.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Nandor Kollar (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150565#comment-16150565
 ] 

Nandor Kollar commented on AVRO-2069:
-

[~dguitelson] looks like we still have test failures, 
TestSpecificRecordBuilder#testInterop fails on my desktop with 
{{java.lang.AssertionError: Use assertEquals(expected, actual, delta) to 
compare floating-point numbers}}. There are two asserts for float and double in 
this test, could you please replace them to one with an additional delta 
parameter?

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Sean Busbey (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150545#comment-16150545
 ] 

Sean Busbey commented on AVRO-2069:
---

excellent find Anna! I'll go read back through those discussions.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Anna Szonyi (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150536#comment-16150536
 ] 

Anna Szonyi commented on AVRO-2069:
---

I looked at the git blame/history and it seems that it hasn't been changed 
since the initial commit AVRO-839 and there didn't seem to be a discussion 
around this, *however* I found the duplicate of that jira AVRO-784 where it 
seems this exact discussion happened between Doug Cutting and the author and it 
seems to be in favor of the unboxed solution.

Regards,
Anna 

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Sean Busbey (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150481#comment-16150481
 ] 

Sean Busbey commented on AVRO-2069:
---

we'll need to flag this as an incompatible change, but I agree that it's a 
great improvement.

Normally users who rely on the specific compiler are performance sensitive. Do 
we have any idea if the use of boxed object here was a discussed design 
decision? The only reason I can think of to use them is it allows returning 
null, but that won't be the case if we're directly referencing the primitives 
anyways.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-31 Thread Daniil Gitelson (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16150070#comment-16150070
 ] 

Daniil Gitelson commented on AVRO-2069:
---

Great, [~nkollar]! Will it be scheduled to 1.9.0 release?

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-31 Thread Nandor Kollar (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16148697#comment-16148697
 ] 

Nandor Kollar commented on AVRO-2069:
-

Thanks Daniil, now all tests passed. Looks good to me!

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-30 Thread Daniil Gitelson (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16147464#comment-16147464
 ] 

Daniil Gitelson commented on AVRO-2069:
---

[~nkollar], sorry, missed them. Fixed.



> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-30 Thread Nandor Kollar (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16147129#comment-16147129
 ] 

Nandor Kollar commented on AVRO-2069:
-

[~dguitelson] looks like three test fails in TestSpecificCompilerTool: 
testCompileSchemaTwoFiles, testCompileSchemasUsingString and 
testCompileSchemaFileAndDirectory. You should change the expected files 
(lang/java/tools/src/test/compiler/output/Player.java and 
lang/java/tools/src/test/compiler/output/Position.java), the methods should 
return primitive types there according to your modification.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16144980#comment-16144980
 ] 

ASF GitHub Bot commented on AVRO-2069:
--

GitHub user daniilguit opened a pull request:

https://github.com/apache/avro/pull/243

AVRO-2069: Use primitive fields in generated getters & setters in Java code



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/daniilguit/avro master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/avro/pull/243.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #243


commit 3414eae643517591015e3a6154c726c31f2d3095
Author: Daniil Guitelson 
Date:   2017-08-29T09:13:42Z

AVRO-2069: Use primitive fields in generated getters & setters in Java code




> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> I propose generating appropriate primitive types.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)