|
|
@ -127,6 +127,9 @@ public final class userDB {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Entry getEntry(String userName) {
|
|
|
|
public Entry getEntry(String userName) {
|
|
|
|
|
|
|
|
if(userName.length()>128){
|
|
|
|
|
|
|
|
userName=userName.substring(128);
|
|
|
|
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Map record = userTable.get(userName);
|
|
|
|
Map record = userTable.get(userName);
|
|
|
|
if (record == null) return null;
|
|
|
|
if (record == null) return null;
|
|
|
@ -269,7 +272,10 @@ public final class userDB {
|
|
|
|
|
|
|
|
|
|
|
|
public Entry(String userName, Map mem) {
|
|
|
|
public Entry(String userName, Map mem) {
|
|
|
|
if ((userName == null) || (userName.length() == 0))
|
|
|
|
if ((userName == null) || (userName.length() == 0))
|
|
|
|
throw new IllegalArgumentException();
|
|
|
|
throw new IllegalArgumentException("Username needed.");
|
|
|
|
|
|
|
|
if(userName.length()>128){
|
|
|
|
|
|
|
|
throw new IllegalArgumentException("Username too long!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.userName = userName.trim();
|
|
|
|
this.userName = userName.trim();
|
|
|
|
if (this.userName.length() < USERNAME_MIN_LENGTH)
|
|
|
|
if (this.userName.length() < USERNAME_MIN_LENGTH)
|
|
|
|