Update InitialSecuritySetup.java
This commit is contained in:
parent
e9042e0b7e
commit
26a457f9d0
1 changed files with 5 additions and 6 deletions
|
@ -39,12 +39,11 @@ public class InitialSecuritySetup {
|
||||||
userService.isUsernameValidWithReturn(initialUsername);
|
userService.isUsernameValidWithReturn(initialUsername);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
Path pathToFile = Paths.get("configs/settings.yml");
|
Path pathToFile = Paths.get("configs/settings.yml");
|
||||||
try {
|
|
||||||
if (Files.exists(pathToFile)) {
|
if (Files.exists(pathToFile)) {
|
||||||
Files.delete(pathToFile);
|
logger.error(
|
||||||
}
|
"Invalid initial username provided , username can only contain letters, numbers and the following special characters @._+- or must be a valid email address.");
|
||||||
} catch (IOException ex) {
|
System.exit(1);
|
||||||
logger.info(ex.getMessage());
|
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue