[YANGTOOLS-187] Generated *Key classes define serialVersionUID but do not implement Serializable Created: 12/Jun/14  Updated: 10/Apr/22  Due: 25/Jun/14  Resolved: 23/Jun/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Rob Adams Assignee: Martin Vitez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 1195

 Description   

There's no reason to include a serialVersionUID in a class that doesn't implement Serializable. Note that the fields of the keys are generally not serializable, so this isn't a matter of adding implemented Serializable. Recommendation is remove serialVersionUID.

e.g.:

public class CapabilityKey
implements Identifier<Capability>

{ private static final long serialVersionUID = 3133965736403838075L; final private CapabilityName _name; ... }

 Comments   
Comment by Tony Tkacik [ 19/Jun/14 ]

Hi, actually we had request to make this keys serializable (they inherit serializable interface via /superinterface Identifier).

Missing Serializable for referenced objects was a bug, which is fixed by https://git.opendaylight.org/gerrit/#/c/8143/

Comment by Martin Vitez [ 23/Jun/14 ]

https://git.opendaylight.org/gerrit/#/c/8143/

this patch made all classes generated from yang typedefs serializable

Generated at Wed Feb 07 20:52:31 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.