Fixed bug not allowing users without command line arguments

This commit is contained in:
delvh 2020-08-31 09:02:07 +02:00
parent dc114e5b3c
commit 9bd06336eb
2 changed files with 11 additions and 3 deletions

View File

@ -68,13 +68,19 @@ public final class ClientConfig extends Config {
* @return the user name
* @since Envoy Client v0.3-alpha
*/
public String getUser() { return (String) items.get("user").get(); }
public String getUser() {
final String user = (String) items.get("user").get();
return user.equals("") ? null : user;
}
/**
* @return the password
* @since Envoy Client v0.3-alpha
*/
public String getPassword() { return (String) items.get("password").get(); }
public String getPassword() {
final String password = (String) items.get("password").get();
return password.equals("") ? null : password;
}
/**
* @return {@code true} if user name and password are set

View File

@ -1,6 +1,8 @@
server=localhost
port=8080
localDB=localDB
password=
user=
ignoreLocalDB=false
consoleLevelBarrier=FINER
fileLevelBarrier=OFF
ignoreLocalDB=false