浏览代码

Remove unused equals

sunyj 8 年之前
父节点
当前提交
64e5a4cb4e

+ 0 - 15
kanban-auth/src/main/java/com/uas/kanban/model/User.java

@@ -8,7 +8,6 @@ import org.mongodb.morphia.annotations.IndexOptions;
 import org.mongodb.morphia.annotations.Indexed;
 
 import java.util.List;
-import java.util.Objects;
 
 /**
  * 用户
@@ -88,20 +87,6 @@ public class User extends BaseEntity {
                 "} " + super.toString();
     }
 
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass() || !(obj instanceof User)) {
-            return false;
-        }
-        User other = (User) obj;
-        return Objects.equals(code, other.getCode()) && Objects.equals(name, other.getName())
-                && Objects.equals(password, other.getPassword()) && Objects.equals(role, other.getRole())
-                && Objects.equals(panelCodes, other.getPanelCodes());
-    }
-
     /**
      * 角色
      *

+ 0 - 15
kanban-console/src/main/java/com/uas/kanban/model/DataSource.java

@@ -7,8 +7,6 @@ import org.mongodb.morphia.annotations.Entity;
 import org.mongodb.morphia.annotations.IndexOptions;
 import org.mongodb.morphia.annotations.Indexed;
 
-import java.util.Objects;
-
 /**
  * 数据源
  *
@@ -103,17 +101,4 @@ public class DataSource extends BaseEntity {
                 "} " + super.toString();
     }
 
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass() || !(obj instanceof DataSource)) {
-            return false;
-        }
-        DataSource other = (DataSource) obj;
-        return Objects.equals(code, other.getCode()) && Objects.equals(name, other.getName())
-                && Objects.equals(driverClassName, other.getDriverClassName()) && Objects.equals(url, other.getUrl())
-                && Objects.equals(username, other.getUsername()) && Objects.equals(password, other.getPassword());
-    }
 }