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 - Serializable private methods considered as unused
Summary: Serializable private methods considered as unused
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Other
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 17:22 UTC by terje7601
Modified: 2015-09-30 01:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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