Closed akarnokd closed 8 years ago
Hi @akarnokd.
I understand your comments about making some fields volatile and final. But I don't follow you when you say that certain fields are private and still they generate "accessors".
Jake Wharton had a talk recently about private fields and methods increasing the method count due to VM requirements.
Thanks :) I'll remove the modifier.
Hi, just looking at libraries using RC2 and found these issues.
The
emitted
field is private and generates an accessor:https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/ActivitiesLifecycleCallbacks.java#L57
The same
emitted
field is not volatile and possibly read in another thread:https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/ActivitiesLifecycleCallbacks.java#L70
These fields are also private and generate accessors:
https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/ActivitiesLifecycleCallbacks.java#L12
liveActivityOrNull
is possibly read in another thread and should be volatile:https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/ActivitiesLifecycleCallbacks.java#L63
subject
could be final:https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java#L52
clazz
is private and generates an accessor:https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java#L51 https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java#L100 https://github.com/VictorAlbertos/RxActivityResult/blob/2.x/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java#L138