bug fix in cache injection

Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/aae66bf4
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/aae66bf4
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/aae66bf4

Branch: refs/heads/develop
Commit: aae66bf491ece16c683fafc921d79c450a9d0162
Parents: 7befade
Author: Sebastian Schaffert <[email protected]>
Authored: Thu Dec 19 11:39:54 2013 +0100
Committer: Sebastian Schaffert <[email protected]>
Committed: Thu Dec 19 11:39:54 2013 +0100

----------------------------------------------------------------------
 .../marmotta/platform/user/services/AccountServiceImpl.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/aae66bf4/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AccountServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AccountServiceImpl.java
 
b/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AccountServiceImpl.java
index beede92..90b502e 100644
--- 
a/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AccountServiceImpl.java
+++ 
b/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AccountServiceImpl.java
@@ -58,7 +58,7 @@ public class AccountServiceImpl implements AccountService {
 
     @Inject
     @MarmottaCache("user-cache")
-    private Cache<String,UserAccount>  userCache;
+    private Cache  userCache;
 
     private PasswordHash         hashAlgo;
 
@@ -209,7 +209,7 @@ public class AccountServiceImpl implements AccountService {
 
         UserAccount account = null;
         if (userCache != null && userCache.get(resource) != null) {
-            account = userCache.get(resource);
+            account = (UserAccount) userCache.get(resource);
         } else {
             for(UserAccount a : listAccounts()) {
                 if(a.getWebId().equals(resource.stringValue())) {

Reply via email to