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.
Summary: | Unused method hint should ignore Java serialization readObject/writeObject methods | ||
---|---|---|---|
Product: | java | Reporter: | wrprice <wrprice> |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | faramir2 |
Priority: | P4 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 10 x64 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Screenshot of IDE hint |
Description
wrprice
2007-12-03 17:50:22 UTC
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 |