[
https://issues.apache.org/jira/browse/THRIFT-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryan Duxbury closed THRIFT-1004.
---------------------------------
Resolution: Invalid
They're that way on purpose for legacy reasons. Use "thrift --gen
java:private-members" to make them private.
> Generated Java classes should have properly encapsulated private variables
> --------------------------------------------------------------------------
>
> Key: THRIFT-1004
> URL: https://issues.apache.org/jira/browse/THRIFT-1004
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Reporter: Tomas Varaneckas
> Priority: Minor
>
> Thrift Java compiler generates classes with public variables, so you can get
> and set them not only via getters and setters, but also directly. This is bad
> design, it breaks the principle of encapsulation. Generated code should have
> private members.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.