mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fix 3 javac warnings: redundant cast
see GitHub issue #561 for context [javac] /home/thk/git/yacy_search_server/source/net/yacy/htroot/ConfigAccounts_p.java:85: warning: [cast] redundant cast to YaCyHttpServer [javac] final YaCyHttpServer jhttpserver = (YaCyHttpServer)sb.getHttpServer(); [javac] ^ [javac] /home/thk/git/yacy_search_server/source/net/yacy/htroot/ConfigUser_p.java:156: warning: [cast] redundant cast to YaCyHttpServer [javac] final YaCyHttpServer jhttpserver = (YaCyHttpServer) sb.getHttpServer(); [javac] ^ [javac] /home/thk/git/yacy_search_server/source/net/yacy/htroot/ConfigUser_p.java:167: warning: [cast] redundant cast to YaCyHttpServer [javac] final YaCyHttpServer jhttpserver = (YaCyHttpServer) sb.getHttpServer();
This commit is contained in:
parent
3230df6e2b
commit
6bca836f49
|
@ -82,7 +82,7 @@ public class ConfigAccounts_p {
|
|||
env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, sb.encodeDigestAuth(user, pw1));
|
||||
env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME,user);
|
||||
// make sure server accepts new credentials
|
||||
final YaCyHttpServer jhttpserver = (YaCyHttpServer)sb.getHttpServer();
|
||||
final YaCyHttpServer jhttpserver = sb.getHttpServer();
|
||||
if (!user.equals(oldusername)) jhttpserver.removeUser(oldusername);
|
||||
jhttpserver.resetUser(user);
|
||||
} else {
|
||||
|
|
|
@ -153,7 +153,7 @@ public class ConfigUser_p {
|
|||
} catch (final Exception e) {
|
||||
ConcurrentLog.logException(e);
|
||||
}
|
||||
final YaCyHttpServer jhttpserver = (YaCyHttpServer) sb.getHttpServer();
|
||||
final YaCyHttpServer jhttpserver = sb.getHttpServer();
|
||||
jhttpserver.resetUser(entry.getUserName());
|
||||
} else {
|
||||
prop.put("error", "1");
|
||||
|
@ -164,7 +164,7 @@ public class ConfigUser_p {
|
|||
prop.putHTML("username", username);
|
||||
} else if (post.containsKey("delete")) {
|
||||
sb.userDB.removeEntry(post.get("username"));
|
||||
final YaCyHttpServer jhttpserver = (YaCyHttpServer) sb.getHttpServer();
|
||||
final YaCyHttpServer jhttpserver = sb.getHttpServer();
|
||||
jhttpserver.removeUser(post.get("username"));
|
||||
prop.put(serverObjects.ACTION_LOCATION, "ConfigAccountList_p.html"); // jump back to user list
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user