cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1410302 - in /cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common: AccessTokenRegistration.java OAuthPermission.java ServerAccessToken.java
Date Fri, 16 Nov 2012 11:04:45 GMT
Author: sergeyb
Date: Fri Nov 16 11:04:44 2012
New Revision: 1410302

URL: http://svn.apache.org/viewvc?rev=1410302&view=rev
Log:
[CXF-4637] More replacing of Collections.emptyList() with modifiable instances in the OAuth2
code

Modified:
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AccessTokenRegistration.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthPermission.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/ServerAccessToken.java

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AccessTokenRegistration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AccessTokenRegistration.java?rev=1410302&r1=1410301&r2=1410302&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AccessTokenRegistration.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AccessTokenRegistration.java
Fri Nov 16 11:04:44 2012
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.rs.security.oauth2.common;
 
-import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
 
 /**
@@ -26,8 +26,8 @@ import java.util.List;
  */
 public class AccessTokenRegistration {
     private Client client; 
-    private List<String> requestedScope = Collections.emptyList();
-    private List<String> approvedScope = Collections.emptyList();
+    private List<String> requestedScope = new LinkedList<String>();
+    private List<String> approvedScope = new LinkedList<String>();
     private String grantType;
     private UserSubject subject;
     

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthPermission.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthPermission.java?rev=1410302&r1=1410301&r2=1410302&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthPermission.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthPermission.java
Fri Nov 16 11:04:44 2012
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.rs.security.oauth2.common;
 
-import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlRootElement;
@@ -32,8 +32,8 @@ import javax.xml.bind.annotation.XmlRoot
  */
 @XmlRootElement
 public class OAuthPermission extends Permission {
-    private List<String> httpVerbs = Collections.emptyList();
-    private List<String> uris = Collections.emptyList();
+    private List<String> httpVerbs = new LinkedList<String>();
+    private List<String> uris = new LinkedList<String>();
     
     public OAuthPermission() {
         

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/ServerAccessToken.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/ServerAccessToken.java?rev=1410302&r1=1410301&r2=1410302&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/ServerAccessToken.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/ServerAccessToken.java
Fri Nov 16 11:04:44 2012
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.rs.security.oauth2.common;
 
-import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
 
 /**
@@ -27,7 +27,7 @@ import java.util.List;
 public abstract class ServerAccessToken extends AccessToken {
     private String grantType;
     private Client client;
-    private List<OAuthPermission> scopes = Collections.emptyList();
+    private List<OAuthPermission> scopes = new LinkedList<OAuthPermission>();
     private UserSubject subject;
     
     protected ServerAccessToken(Client client, 



Mime
View raw message