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

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

Commit acce806f68282a2b02f07e06ab304d2ae3fc308e in avro's branch 
refs/heads/master from zeshuai007
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=acce806 ]

AVRO-2419:Avro-tools should support fieldvisibility settings like 
avro-maven-plugin
AVRO-2419:pom.xml exclude FieldVisibilityTest.java
Update SpecificCompilerTool.java
Import Locale package
Closes #678


> Generate private attribute in Java
> ----------------------------------
>
>                 Key: AVRO-2419
>                 URL: https://issues.apache.org/jira/browse/AVRO-2419
>             Project: Apache Avro
>          Issue Type: Wish
>          Components: java
>    Affects Versions: 1.7.7
>            Reporter: khuynhthanhchiluyen
>            Assignee: Zezeng Wang
>            Priority: Major
>
> I used file user.avsc like below:
> {  
>     "namespace":"example.avro",
>     "type":"record",
>     "name":"User",
>     "fields":[  
>        
> {            "name":"name",          "type":"string"       }
> ,
>        
> {            "name":"favorite_number",          "type":[               "int", 
>             "null"          ]       }
> ,
>        
> {            "name":"favorite_color",          "type":[               
> "string",             "null"          ]       }
>    ]
>  }
>  
> And I used avro-1.7.7.jar to generate my Java code:
> java -jar java -jar avro-tools-1.7.7.jar compile -string schema user.avsc 
> D:\result
>  
> But all attributes of User class (name, favorite_number, favorite_color) 
> appear to be "public". Where did I miss to make them private (for 
> encapsulation). Thank you very much.



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

Reply via email to