[ https://issues.apache.org/jira/browse/KAFKA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manikumar resolved KAFKA-354. ----------------------------- Resolution: Won't Fix Closing inactive issue. > Refactor getter and setter API to conform to the new convention > --------------------------------------------------------------- > > Key: KAFKA-354 > URL: https://issues.apache.org/jira/browse/KAFKA-354 > Project: Kafka > Issue Type: Sub-task > Affects Versions: 0.8.0 > Reporter: Neha Narkhede > Assignee: Joe Stein > Labels: optimization > > We just agreed on a new convention for getter/setter APIs. It will be good to > refactor code to conform to that. > > We can actually go with public vals or vars - there is not much point in > > defining a custom getter/setter as that is redundant. > > > > For example: > > - start with "val x" > > - over time, we determine that it needs to be mutable - change it to "var > > x" > > - if you need something more custom (e.g., enforce constraints on the > > values that you can assign) then we can add the custom setter > > private[this] var underyling: T = ... > > def x = underlying > > def x_=(update: T) { if (constraint satisfied) {underlying = update} > > else {throw new Exception} } > > > > All of the above changes will be binary compatible since under the covers, > > reads/assignments are all through getter/setter methods. -- This message was sent by Atlassian JIRA (v6.4.14#64029)