Skip to content

Commit

Permalink
fix[App]: fix spelling of static variable MAX_RETRIES
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Marjoni committed Apr 20, 2026
1 parent c4d31dc commit 3b3376f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/edu/group5/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class App extends Application {
NavigationController nav;

private Logger logger;
static int MAX_ReTRIES = 3;
static int MAX_RETRIES = 3;

@Override
public void init() {
Expand All @@ -46,12 +46,12 @@ public void init() {
OrgApiWrapper orgApiWrapper = new OrgApiWrapper("https://app.innsamlingskontrollen.no/api/public/v1/all");

int retries = 0;
while (!dbWrapper.connect() && retries < MAX_ReTRIES) {
while (!dbWrapper.connect() && retries < MAX_RETRIES) {
this.logger.warning("Failed to connect to database");
retries++;
}
if (retries == MAX_ReTRIES) {
this.logger.severe("Failed to connect to database after " + MAX_ReTRIES + " attempts");
if (retries == MAX_RETRIES) {
this.logger.severe("Failed to connect to database after " + MAX_RETRIES + " attempts");
throw new RuntimeException("Failed to connect to database");
}

Expand Down

0 comments on commit 3b3376f

Please sign in to comment.