incubator-amber-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r963012 - in /incubator/amber/trunk: signature-api/src/test/java/org/apache/amber/signature/FakeOAuthRequest.java spec-api/src/main/java/org/apache/amber/OAuthRequest.java
Date Sun, 11 Jul 2010 08:14:17 GMT
Author: simonetripodi
Date: Sun Jul 11 08:14:17 2010
New Revision: 963012

URL: http://svn.apache.org/viewvc?rev=963012&view=rev
Log:
fixed broken tests: no need to expose a specific data structure, Collection is enough
minor format - tabs replaced by 4 spaces
removed unused imports

Modified:
    incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/FakeOAuthRequest.java
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java

Modified: incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/FakeOAuthRequest.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/FakeOAuthRequest.java?rev=963012&r1=963011&r2=963012&view=diff
==============================================================================
--- incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/FakeOAuthRequest.java
(original)
+++ incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/FakeOAuthRequest.java
Sun Jul 11 08:14:17 2010
@@ -17,6 +17,7 @@
 package org.apache.amber.signature;
 
 import java.net.URL;
+import java.util.Collection;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -56,11 +57,11 @@ final class FakeOAuthRequest implements 
         this.httpMethod = httpMethod;
     }
 
-    public SortedSet<OAuthMessageParameter> getOAuthMessageParameters() {
+    public Collection<OAuthMessageParameter> getOAuthMessageParameters() {
         return this.messageParameters;
     }
 
-    public SortedSet<OAuthRequestParameter> getOAuthRequestParameters() {
+    public Collection<OAuthRequestParameter> getOAuthRequestParameters() {
         return this.requestParameters;
     }
 
@@ -72,22 +73,22 @@ final class FakeOAuthRequest implements 
         this.requestURL = requestURL;
     }
 
-	public String getOAuthMessageParameter(OAuthParameter parameter) {
-		for (OAuthMessageParameter omp : this.messageParameters) {
-			if (omp.getKey().equals(parameter)) {
-				return omp.getValue();
-			}
-		}		
-		return null; // not ideal, but it's only a test
-	}
-
-	public String getOAuthRequestParameter(String name) {
-		for (OAuthRequestParameter orp : this.requestParameters) {
-			if (orp.getKey().equals(name)) {
-				return orp.getValue();
-			}
-		}		
-		return null; // not ideal, but it's only a test
-	}
+    public String getOAuthMessageParameter(OAuthParameter parameter) {
+        for (OAuthMessageParameter omp : this.messageParameters) {
+            if (omp.getKey().equals(parameter)) {
+                return omp.getValue();
+            }
+        }
+        return null; // not ideal, but it's only a test
+    }
+
+    public String getOAuthRequestParameter(String name) {
+        for (OAuthRequestParameter orp : this.requestParameters) {
+            if (orp.getKey().equals(name)) {
+                return orp.getValue();
+            }
+        }
+        return null; // not ideal, but it's only a test
+    }
 
 }

Modified: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java?rev=963012&r1=963011&r2=963012&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java Sun Jul
11 08:14:17 2010
@@ -17,7 +17,7 @@
 package org.apache.amber;
 
 import java.net.URL;
-import java.util.SortedSet;
+import java.util.Collection;
 
 /**
  * A convenient object representing the properties of an OAuth request to a
@@ -45,7 +45,7 @@ public interface OAuthRequest {
      *
      * @return the OAuth parameters will be included in the OAuth message.
      */
-    SortedSet<OAuthMessageParameter> getOAuthMessageParameters();
+    Collection<OAuthMessageParameter> getOAuthMessageParameters();
 
     /**
      * @param parameter
@@ -63,7 +63,7 @@ public interface OAuthRequest {
      *
      * @return the aux parameters client will included in the request.
      */
-    SortedSet<OAuthRequestParameter> getOAuthRequestParameters();
+    Collection<OAuthRequestParameter> getOAuthRequestParameters();
 
     /**
      * @param signatureMethod



Mime
View raw message