Skip to content

Commit

Permalink
[SHIRO-778] onInit method on AuthenticatingRealm is called twice
Browse files Browse the repository at this point in the history
  • Loading branch information
fpapon committed Jun 15, 2020
1 parent 2e29785 commit b43c8af
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,15 @@ private String parseBeanId(String lhs) {
}

processor.execute();
}

//SHIRO-413: init method must be called for constructed objects that are Initializable
LifecycleUtils.init(objects.values());
//SHIRO-778: onInit method on AuthenticatingRealm is called twice
objects.keySet().stream()
.filter(key -> !kvPairs.keySet().contains(key))
.forEach(key -> LifecycleUtils.init(objects.get(key)));
} else {
//SHIRO-413: init method must be called for constructed objects that are Initializable
LifecycleUtils.init(objects.values());
}

return objects;
}
Expand Down

0 comments on commit b43c8af

Please sign in to comment.