I have a small class in my Android project containing some variables, I assign them in the constructor.
I then serialize the object to json using the Gson library and the function String Gson::toJson(Object src)
How can I solve this lint warning : "private field is assigned but never accessed" on these variables? Is there a special comment for that case?
edit : sorry there is another warning too "Field can be converted to a local variable" which is wrong!
Thank you!
You can add @SuppressWarnings("unused")
annotation on field which will prevent generating such messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With