Skip to content

Commit

Permalink
AppContext doesn't need to be static
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnworb committed Feb 19, 2015
1 parent c86df78 commit 4f301a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/spotify/reaper/ReaperApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ public class ReaperApplication extends Application<ReaperApplicationConfiguratio

static final Logger LOG = LoggerFactory.getLogger(ReaperApplication.class);

private static AppContext context;
private AppContext context;

public ReaperApplication() {
super();
LOG.info("default ReaperApplication constructor called");
ReaperApplication.context = new AppContext();
this.context = new AppContext();
}

@VisibleForTesting
public ReaperApplication(AppContext context) {
super();
LOG.info("ReaperApplication constructor called with custom AppContext");
ReaperApplication.context = context;
this.context = context;
}

public static void main(String[] args) throws Exception {
Expand Down

0 comments on commit 4f301a0

Please sign in to comment.