[LIB-10] SerialVersionUID for Serializable classes
[snooker-score-api.git] / src / main / java / org / hedgecode / snooker / json / JsonCollectionEntity.java
index ef67ff6..11f300d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017. Developed by Hedgecode.
+ * Copyright (c) 2017-2020. Developed by Hedgecode.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,9 +36,11 @@ import org.hedgecode.snooker.api.IdEntity;
 public abstract class JsonCollectionEntity<E extends IdEntity>
         implements CollectionEntity<E>, Serializable
 {
+    private static final long serialVersionUID = 6302642716627217361L;
+
     private final Map<Integer, E> entities = new LinkedHashMap<>();
 
-    protected JsonCollectionEntity(E[] entities) {
+    JsonCollectionEntity(E[] entities) {
         for (E entity : entities) {
             if (entity != null)
                 this.entities.put(
@@ -47,7 +49,7 @@ public abstract class JsonCollectionEntity<E extends IdEntity>
         }
     }
 
-    protected JsonCollectionEntity(List<E> entities) {
+    JsonCollectionEntity(List<E> entities) {
         for (E entity : entities) {
             this.entities.put(
                     entity.getId(), entity