Skip to content

Commit

Permalink
KNL-1298 Allow subclasses of ResourceLoader for easier testing.
Browse files Browse the repository at this point in the history
By making the service locators non-static subclasses can be created for tests which change how the dependencies are found.
  • Loading branch information
buckett committed Jan 20, 2015
1 parent 3d104b5 commit e84f931
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public String getUserId() {
private final static Object LOCK = new Object();

private static SessionManager sessionManager;
protected static SessionManager getSessionManager() {
protected SessionManager getSessionManager() {
if (sessionManager == null) {
synchronized (LOCK) {
sessionManager = (SessionManager) ComponentManager.get(SessionManager.class);
Expand All @@ -90,7 +90,7 @@ protected static SessionManager getSessionManager() {
}

private static PreferencesService preferencesService;
protected static PreferencesService getPreferencesService() {
protected PreferencesService getPreferencesService() {
if (preferencesService == null) {
synchronized (LOCK) {
preferencesService = (PreferencesService) ComponentManager.get(PreferencesService.class);
Expand Down

0 comments on commit e84f931

Please sign in to comment.