Consistently define default serialVersionUID

A handful of classes suppressed the warning instead of adding a default
serialVersionUID. I only weakly believe that using a default
serialVersionUID is better than suppressing the warning in these cases,
but I do value consistency.

Change-Id: Ic56ecb2d541c5276a9d32ab822b510598be86600
This commit is contained in:
Dave Borowitz
2018-12-18 19:47:51 -08:00
committed by David Pursehouse
parent 080d30a0f0
commit d7b29fffc6
25 changed files with 54 additions and 25 deletions

View File

@@ -248,8 +248,9 @@ class RelatedChangesTab implements IsWidget {
}
}
@SuppressWarnings("serial")
private class RowSafeHtml implements SafeHtml {
private static final long serialVersionUID = 1L;
private String html;
private ChangeAndCommit info;
private final boolean notConnected;

View File

@@ -35,10 +35,11 @@ public class RevisionInfoCache {
private final LinkedHashMap<PatchSet.Id, String> psToCommit;
@SuppressWarnings("serial")
private RevisionInfoCache() {
psToCommit =
new LinkedHashMap<PatchSet.Id, String>(LIMIT) {
private static final long serialVersionUID = 1L;
@Override
protected boolean removeEldestEntry(Map.Entry<PatchSet.Id, String> e) {
return size() > LIMIT;

View File

@@ -73,9 +73,10 @@ public abstract class NavigationTable<RowItem> extends FancyFlexTable<RowItem> {
}
}
@SuppressWarnings("serial")
private static final LinkedHashMap<String, Object> savedPositions =
new LinkedHashMap<String, Object>(10, 0.75f, true) {
private static final long serialVersionUID = 1L;
@Override
protected boolean removeEldestEntry(Entry<String, Object> eldest) {
return size() >= 20;