This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Java serialization specifies two specific, special private method signatures for customizing object serialization (separate from the Externalizable interface): private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException private void writeObject(ObjectOutputStream out) throws IOException NB IDE 6.0 is hinting that these methods are unused. Though technically correct, since application code should not call these methods directly, the methods might actually be invoked by the JVM if the object implements/inherits the Serializable interface.
Created attachment 53793 [details] Screenshot of IDE hint
This is actually a bug. An inexperienced programmer might believe the false information given by the editor and remove the readObject or writeObject method. The removal would not cause failure in compilation and would only be revealed if the serialization code in question is properly tested.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
The bug (hint about unused readObject/writeObject methods) is still in the 8.2 version of NetBeans. NetBeans should check if class is Serializable and if so, do not generate that hint for these methods: private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException; private void writeObject(java.io.ObjectOutputStream stream) throws IOException private void readObjectNoData() throws ObjectStreamException; Product Version: NetBeans IDE Dev (Build 201607260002)
Apologies, I've made a typo in serialization signatures. Thanks for catching the defect! Fixed in jet-main#8292dafacc39