Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Remove explicit use of ScopeType
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Jun 26, 2015
1 parent 79e9d81 commit a7c7eb3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions zanata-model/src/main/java/org/zanata/model/HDocument.java
Expand Up @@ -313,8 +313,7 @@ private void onUpdate(HDocument doc) {
if (Contexts.isSessionContextActive()) {
HAccount account =
(HAccount) Component.getInstance(
JpaIdentityStore.AUTHENTICATED_USER,
ScopeType.SESSION);
JpaIdentityStore.AUTHENTICATED_USER);
// TODO In some cases there is no session ( such as when pushing
// async )
if (account != null) {
Expand Down
3 changes: 1 addition & 2 deletions zanata-war/src/main/java/org/zanata/action/UserAction.java
Expand Up @@ -98,8 +98,7 @@ public class UserAction extends
private AbstractListFilter<String> userFilter =
new AbstractListFilter<String>() {
AccountDAO accountDAO =
(AccountDAO) Component.getInstance(AccountDAO.class,
ScopeType.STATELESS);
(AccountDAO) Component.getInstance(AccountDAO.class);

@Override
protected List<String> fetchRecords(int start, int max,
Expand Down
Expand Up @@ -382,8 +382,7 @@ private static final ZanataIdentity getIdentity() {

private static final Optional<HAccount> getAuthenticatedAccount() {
return Optional.fromNullable(ServiceLocator.instance().getInstance(
JpaIdentityStore.AUTHENTICATED_USER, ScopeType.SESSION,
HAccount.class));
JpaIdentityStore.AUTHENTICATED_USER, HAccount.class));
}

private static final <T> T extractTarget(Object[] array, Class<T> type) {
Expand Down

0 comments on commit a7c7eb3

Please sign in to comment.