Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in Preferences.setRpcUser? #7347

Open
thecockatiel opened this issue Jan 4, 2025 · 1 comment · May be fixed by #7348
Open

bug in Preferences.setRpcUser? #7347

thecockatiel opened this issue Jan 4, 2025 · 1 comment · May be fixed by #7348
Assignees
Labels

Comments

@thecockatiel
Copy link

thecockatiel commented Jan 4, 2025

public void setRpcUser(String value) {
// We only persist if we have not set the program argument
if (!rpcUserFromOptions.isEmpty()) {
prefPayload.setRpcUser(value);
}
prefPayload.setRpcUser(value);
requestPersistence();
}

the if statement is rendered useless, which one is correct ?

@HenrikJannsen
Copy link
Collaborator

Should be

 public void setRpcUser(String value) { 
     // We only persist if we have not set the program argument 
     if (!rpcUserFromOptions.isEmpty()) { 
         prefPayload.setRpcUser(value); 
         requestPersistence(); 
     } 
 } 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants