mirror of
https://e.coding.net/circlecloud/YumCore.git
synced 2024-12-27 07:28:52 +00:00
fix: 修复阻断性错误
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
975c50a32a
commit
5cfd7a1b2a
@ -92,6 +92,9 @@ public class CommandInfo {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof CommandInfo) {
|
||||
return name.equalsIgnoreCase(((CommandInfo) obj).getName());
|
||||
}
|
||||
@ -157,6 +160,11 @@ public class CommandInfo {
|
||||
return sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return name.toLowerCase().hashCode() + method.hashCode() + origin.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 是否为异步命令
|
||||
*/
|
||||
|
@ -44,6 +44,9 @@ public class TabInfo {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof TabInfo) {
|
||||
return method.equals(((TabInfo) obj).getMethod());
|
||||
}
|
||||
@ -76,4 +79,9 @@ public class TabInfo {
|
||||
public Method getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return method.hashCode() + origin.hashCode();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user