You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2016/01/26 18:00:51 UTC

[2/2] cxf git commit: Adding a convenience method

Adding a convenience method


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

Branch: refs/heads/master
Commit: 8571a5a7993a6c362702bb319ae6a311d5bd7d63
Parents: 0822e7f
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Jan 26 16:59:24 2016 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Jan 26 16:59:24 2016 +0000

----------------------------------------------------------------------
 .../oauth2/provider/DefaultEHCacheOAuthDataProvider.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8571a5a7/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
index 3bf487e..e57e2df 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
@@ -74,10 +74,16 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider {
         return getCacheValue(clientCache, clientId, Client.class);
     }
     
-    @Override
     public void setClient(Client client) {
         putCacheValue(clientCache, client.getClientId(), client, 0);
-        
+    }
+    
+    public void setClients(List<Client> clients) {
+        if (clients != null) {
+            for (Client client : clients) {
+                setClient(client);
+            }
+        }
     }
 
     @Override