[LIB-10] SerialVersionUID for Serializable classes
[snooker-score-api.git] / src / main / java / org / hedgecode / snooker / json / JsonIdEntity.java
index eb6491e..ec84274 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.
@@ -16,8 +16,6 @@
 
 package org.hedgecode.snooker.json;
 
-import java.io.Serializable;
-
 import org.hedgecode.snooker.api.IdEntity;
 
 /**
@@ -25,10 +23,8 @@ import org.hedgecode.snooker.api.IdEntity;
  *
  * @author Dmitry Samoshin aka gotty
  */
-public abstract class JsonIdEntity
-        extends JsonURLEntity
-        implements IdEntity, Serializable
-{
+public abstract class JsonIdEntity extends JsonURLEntity implements IdEntity {
+
     @Override
     public boolean equals(Object obj) {
         if (this == obj)
@@ -43,9 +39,8 @@ public abstract class JsonIdEntity
 
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + getId();
+        int result = getClass().getSimpleName().hashCode();
+        result = 31 * result + getId();
         return result;
     }