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.

Bug 253590

Summary: Serializable private methods considered as unused
Product: java Reporter: terje7601
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: sdedic
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:

Description terje7601 2015-07-20 17:22:25 UTC
Serializable specifies several private methods which can be overridden to influence serialization of Serializable classes:

 private void writeObject(java.io.ObjectOutputStream out)
     throws IOException
 private void readObject(java.io.ObjectInputStream in)
     throws IOException, ClassNotFoundException;
 private void readObjectNoData()
     throws ObjectStreamException;

NetBeans considers these to be unused, even though they are actually used.

This is similar to issue 176240, but not a duplicate.
Comment 1 Svata Dedic 2015-09-22 15:31:38 UTC
Apologies... the unused highlight detection is indeed in Java Editor.

I've extended the check for serialization spec related methods and fields according to the spec.

Fixed in jet-main#78665f2ce804
Comment 2 Quality Engineering 2015-09-30 01:19:42 UTC
Integrated into 'main-silver', will be available in build *201509300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/78665f2ce804
User: Svata Dedic <sdedic@netbeans.org>
Log: #253590: unused symbol highlighter ignores Serialization-related fields and methods