1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-22 01:48:50 +00:00

fix: 修复阻断性错误

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-19 15:56:28 +08:00
parent 975c50a32a
commit 5cfd7a1b2a
2 changed files with 16 additions and 0 deletions

View File

@ -92,6 +92,9 @@ public class CommandInfo {
@Override @Override
public boolean equals(final Object obj) { public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof CommandInfo) { if (obj instanceof CommandInfo) {
return name.equalsIgnoreCase(((CommandInfo) obj).getName()); return name.equalsIgnoreCase(((CommandInfo) obj).getName());
} }
@ -157,6 +160,11 @@ public class CommandInfo {
return sort; return sort;
} }
@Override
public int hashCode() {
return name.toLowerCase().hashCode() + method.hashCode() + origin.hashCode();
}
/** /**
* @return 是否为异步命令 * @return 是否为异步命令
*/ */

View File

@ -44,6 +44,9 @@ public class TabInfo {
@Override @Override
public boolean equals(final Object obj) { public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof TabInfo) { if (obj instanceof TabInfo) {
return method.equals(((TabInfo) obj).getMethod()); return method.equals(((TabInfo) obj).getMethod());
} }
@ -76,4 +79,9 @@ public class TabInfo {
public Method getMethod() { public Method getMethod() {
return method; return method;
} }
@Override
public int hashCode() {
return method.hashCode() + origin.hashCode();
}
} }