Skip to content

Commit d40005f

Browse files
TRUNK-6645: Fix passwordsEntered field visibility to private
1 parent e439d57 commit d40005f

2 files changed

Lines changed: 28 additions & 29 deletions

File tree

web/src/main/java/org/openmrs/web/filter/initialization/InitializationFilter.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ protected void doGet(HttpServletRequest httpRequest, HttpServletResponse httpRes
279279
// the background install thread reads them, causing "using password: NO".
280280
if (!wizardModel.isPasswordsEntered()) {
281281
clearPasswords();
282-
}
282+
}
283283

284284
renderTemplate(DEFAULT_PAGE, referenceMap, httpResponse);
285285
} else if (INSTALL_METHOD.equals(page)) {
@@ -414,13 +414,13 @@ protected void initializeWizardFromResolvedPropertiesIfPresent() {
414414
}
415415

416416
private void clearPasswords() {
417-
wizardModel.databaseRootPassword = "";
418-
wizardModel.createDatabasePassword = "";
419-
wizardModel.createUserPassword = "";
420-
wizardModel.currentDatabasePassword = "";
421-
wizardModel.remotePassword = "";
422-
wizardModel.setPasswordsEntered(false);
423-
}
417+
wizardModel.databaseRootPassword = "";
418+
wizardModel.createDatabasePassword = "";
419+
wizardModel.createUserPassword = "";
420+
wizardModel.currentDatabasePassword = "";
421+
wizardModel.remotePassword = "";
422+
wizardModel.setPasswordsEntered(false);
423+
}
424424

425425
/**
426426
* Called by {@link #doFilter(ServletRequest, ServletResponse, FilterChain)} on POST requests
@@ -875,12 +875,12 @@ else if (IMPLEMENTATION_ID_SETUP.equals(page)) {
875875
}
876876

877877
private void startInstallation() {
878-
if (!isInstallationStarted()) {
879-
initJob = new InitializationCompletion();
880-
setInstallationStarted(true);
881-
initJob.start();
882-
}
883-
}
878+
if (!isInstallationStarted()) {
879+
initJob = new InitializationCompletion();
880+
setInstallationStarted(true);
881+
initJob.start();
882+
}
883+
}
884884

885885
private void createTablesTask() {
886886
if (wizardModel.createTables) {

web/src/main/java/org/openmrs/web/filter/initialization/InitializationWizardModel.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,18 @@ public class InitializationWizardModel {
255255

256256
public Properties additionalPropertiesFromInstallationScript = new Properties();
257257

258-
/**
259-
* True once the user has submitted credentials in the wizard.
260-
* Prevents clearPasswords() from wiping the shared singleton mid-flow
261-
* (e.g. on a parameterless GET caused by a favicon request or redirect)
262-
* before the background install thread has read them.
263-
*/
264-
private boolean passwordsEntered = false;
265-
266-
public boolean isPasswordsEntered() {
267-
return passwordsEntered;
268-
}
269-
270-
public void setPasswordsEntered(boolean passwordsEntered) {
271-
this.passwordsEntered = passwordsEntered;
272-
}
258+
/**
259+
* True once the user has submitted credentials in the wizard. Prevents clearPasswords() from wiping
260+
* the shared singleton mid-flow (e.g. on a parameterless GET caused by a favicon request or
261+
* redirect) before the background install thread has read them.
262+
*/
263+
private boolean passwordsEntered = false;
264+
265+
public boolean isPasswordsEntered() {
266+
return passwordsEntered;
267+
}
268+
269+
public void setPasswordsEntered(boolean passwordsEntered) {
270+
this.passwordsEntered = passwordsEntered;
271+
}
273272
}

0 commit comments

Comments
 (0)