Java Style Guide: Recommend making toString() overrides Debug-only |
|
Issue descriptionOverriding Object#toString() is most frequently used to as a debugging aid when printing objects. We currently have 37 overrides: https://cs.chromium.org/search/?q=lang:java+public.*toString%5C(+-file:third_party+-file:test&sq=package:chromium&type=cs Certainly some of them are used for many than just debugging aids, but I think it's the exception to the norm. It would be nice to still support the debug usecase, but we should add @RemovableInRelease to the overrides, and ensure that proguard removes them for release builds. |
|
►
Sign in to add a comment |
|
Comment 1 by agrieve@chromium.org
, Jan 14