incubator-amber-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1076682 - /incubator/amber/trunk/oauth-2.0/oauth2-rs-filter/src/main/java/org/apache/amber/oauth2/rsfilter/OAuthFilter.java
Date Thu, 03 Mar 2011 16:57:31 GMT
Author: tommaso
Date: Thu Mar  3 16:57:30 2011
New Revision: 1076682

URL: http://svn.apache.org/viewvc?rev=1076682&view=rev
Log:
[AMBER-14] - applied patch provided by Ben Noordhuis

Modified:
    incubator/amber/trunk/oauth-2.0/oauth2-rs-filter/src/main/java/org/apache/amber/oauth2/rsfilter/OAuthFilter.java

Modified: incubator/amber/trunk/oauth-2.0/oauth2-rs-filter/src/main/java/org/apache/amber/oauth2/rsfilter/OAuthFilter.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/oauth-2.0/oauth2-rs-filter/src/main/java/org/apache/amber/oauth2/rsfilter/OAuthFilter.java?rev=1076682&r1=1076681&r2=1076682&view=diff
==============================================================================
--- incubator/amber/trunk/oauth-2.0/oauth2-rs-filter/src/main/java/org/apache/amber/oauth2/rsfilter/OAuthFilter.java
(original)
+++ incubator/amber/trunk/oauth-2.0/oauth2-rs-filter/src/main/java/org/apache/amber/oauth2/rsfilter/OAuthFilter.java
Thu Mar  3 16:57:30 2011
@@ -21,26 +21,21 @@
 
 package org.apache.amber.oauth2.rsfilter;
 
-import java.io.IOException;
-import java.security.Principal;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.amber.oauth2.common.OAuth;
 import org.apache.amber.oauth2.common.error.OAuthError;
 import org.apache.amber.oauth2.common.exception.OAuthProblemException;
 import org.apache.amber.oauth2.common.exception.OAuthSystemException;
+import org.apache.amber.oauth2.common.message.OAuthResponse;
 import org.apache.amber.oauth2.common.message.types.ParameterStyle;
 import org.apache.amber.oauth2.rs.request.OAuthAccessResourceRequest;
 import org.apache.amber.oauth2.rs.response.OAuthRSResponse;
-import org.apache.amber.oauth2.common.message.OAuthResponse;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.security.Principal;
 
 /**
  * @author Maciej Machulak (m.p.machulak@ncl.ac.uk)
@@ -83,8 +78,8 @@ public class OAuthFilter implements Filt
         } else {
             String[] parameters = parameterStylesString.split(TOKEN_DELIMITER);
             if (parameters != null && parameters.length > 0) {
+                parameterStyles = new ParameterStyle[parameters.length];
                 for (int i = 0; i < parameters.length; i++) {
-                    parameterStyles = new ParameterStyle[parameters.length];
                     ParameterStyle tempParameterStyle = ParameterStyle.valueOf(parameters[i]);
                     if (tempParameterStyle != null) {
                         parameterStyles[i] = tempParameterStyle;



Mime
View raw message