Community
Participate
Working Groups
If the compiler should warn about "Unused private types, methodes of fields" in the compiler dialog it is also warning, if there is a private readObject() or writeObject().
What do you mean exactly ?
If you set "Preferences > Compiler > Unused private types, methodes of fields" from Ignore to Warning it will complain about "unused private..." as said. But if you are working with serialization you will often write private methods readObject(), writeObject(), and this is completely ok and should IMHO not declarate as a waring. But I think this is a view of perception, thus this is a question, not an error.
I see. Indeed, we should not flag these, as they are reserved methods. Along this line, we don't report unused private 0-args constructors, as it is a known pattern for blocking instantiation.
Special cased these, may want to open this in the future. Fixed in latest
*** Bug 31917 has been marked as a duplicate of this bug. ***
*** Bug 32164 has been marked as a duplicate of this bug. ***
Verified.