cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Minor change
Date Tue, 22 Jul 2014 15:18:20 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master db7b4ea76 -> 909e640e0


Minor change


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

Branch: refs/heads/master
Commit: 909e640e0b1250d57bc7902d2418e9538a2d130a
Parents: db7b4ea
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Jul 22 16:18:10 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Jul 22 16:18:10 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/fediz/jetty/FederationLoginService.java | 5 ++---
 .../org/apache/cxf/fediz/tomcat/FederationAuthenticator.java    | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/909e640e/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
----------------------------------------------------------------------
diff --git a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
index d94bc4a..bb850f1 100644
--- a/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
+++ b/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationLoginService.java
@@ -19,7 +19,7 @@
 
 package org.apache.cxf.fediz.jetty;
 
-import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -116,8 +116,7 @@ public class FederationLoginService extends AbstractLifeCycle implements
LoginSe
 
             List<String> roles = wfRes.getRoles();
             if (roles == null || roles.size() == 0) {
-                roles = new ArrayList<String>();
-                roles.add(new String("Authenticated"));
+                roles = Collections.singletonList("Authenticated");
             }
             
             FederationUserPrincipal user = new FederationUserPrincipal(wfRes.getUsername(),
wfRes);

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/909e640e/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
index 719efc9..5c64332 100644
--- a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
+++ b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
@@ -25,7 +25,7 @@ import java.io.InputStream;
 import java.io.PrintWriter;
 import java.security.Principal;
 import java.security.cert.X509Certificate;
-import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -466,8 +466,7 @@ public class FederationAuthenticator extends FormAuthenticator {
 
                 List<String> roles = wfRes.getRoles();
                 if (roles == null || roles.size() == 0) {
-                    roles = new ArrayList<String>();
-                    roles.add(new String("Authenticated"));
+                    roles = Collections.singletonList("Authenticated");
                 }
 
                 principal = new FederationPrincipalImpl(wfRes.getUsername(), roles,


Mime
View raw message