Multiple changes

Working on async schematic saving
Default plot clearing is now properly async (and somewhat slower)
Offline mode servers now default to lowercase (there has been ample time
to update)
Fixed some issues with plot expiry
Fixed some issues with UUID caching
Optimized UUID fetching from cache (marginal)
This commit is contained in:
boy0001
2015-07-19 23:12:48 +10:00
parent 404933c3a7
commit 9c635810b0
14 changed files with 210 additions and 140 deletions

View File

@ -53,11 +53,14 @@ public class StringWrapper {
if (getClass() != obj.getClass()) {
return false;
}
if (obj.hashCode() != hashCode()) {
return false;
}
final StringWrapper other = (StringWrapper) obj;
if ((other.value == null) || (this.value == null)) {
return false;
}
return other.value.toLowerCase().equals(this.value.toLowerCase());
return other.value.equalsIgnoreCase(this.value.toLowerCase());
}
/**
@ -70,6 +73,8 @@ public class StringWrapper {
return this.value;
}
private int hash;
/**
* Get the hash value
*
@ -80,6 +85,9 @@ public class StringWrapper {
if (this.value == null) {
return 0;
}
return this.value.toLowerCase().hashCode();
if (this.hash == 0) {
this.hash = this.value.toLowerCase().hashCode();
}
return hash;
}
}