incubator-amber-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=963058&view=rev
Log:
request url type switched to URI instead of URL

Modified:
    incubator/amber/trunk/   (props changed)
    incubator/amber/trunk/signature-api/   (props changed)
    incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/AbstractMethod.java
    incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/AbstractSimpleMethodTestCase.java
    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

Propchange: incubator/amber/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jul 11 12:08:32 2010
@@ -0,0 +1 @@
+target

Propchange: incubator/amber/trunk/signature-api/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Jul 11 12:08:32 2010
@@ -1 +1,2 @@
 target
+test-output

Modified: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/AbstractMethod.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/AbstractMethod.java?rev=963058&r1=963057&r2=963058&view=diff
==============================================================================
--- incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/AbstractMethod.java
(original)
+++ incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/AbstractMethod.java
Sun Jul 11 12:08:32 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.amber.signature;
 
-import java.net.URL;
+import java.net.URI;
 import java.nio.charset.Charset;
 import java.util.Arrays;
 import java.util.BitSet;
@@ -218,8 +218,8 @@ public abstract class AbstractMethod imp
         String method = request.getHTTPMethod().name();
 
         // the normalized request URL
-        URL url = request.getRequestURL();
-        String scheme = url.getProtocol().toLowerCase();
+        URI url = request.getRequestURL();
+        String scheme = url.getScheme().toLowerCase();
         String authority = url.getAuthority().toLowerCase();
 
         int port = url.getPort();

Modified: incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/AbstractSimpleMethodTestCase.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/AbstractSimpleMethodTestCase.java?rev=963058&r1=963057&r2=963058&view=diff
==============================================================================
--- incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/AbstractSimpleMethodTestCase.java
(original)
+++ incubator/amber/trunk/signature-api/src/test/java/org/apache/amber/signature/AbstractSimpleMethodTestCase.java
Sun Jul 11 12:08:32 2010
@@ -18,7 +18,7 @@ package org.apache.amber.signature;
 
 import static junit.framework.Assert.assertTrue;
 
-import java.net.URL;
+import java.net.URI;
 
 import org.apache.amber.HTTPMethod;
 import org.apache.amber.OAuthMessageParameter;
@@ -40,7 +40,7 @@ public abstract class AbstractSimpleMeth
             SignatureMethod signatureMethod,
             String expectedSignature) throws Exception {
         OAuthRequest request = new FakeOAuthRequest();
-        request.setRequestURL(new URL("http://photos.example.net/photos"));
+        request.setRequestURL(URI.create("http://photos.example.net/photos"));
         request.setHTTPMethod(HTTPMethod.GET);
         addMessageParameter(OAuthParameter.CONSUMER_KEY, "dpf43f3p2l4k3l03", request);
         addMessageParameter(OAuthParameter.NONCE, "kllo9940pd9333jh", request);

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=963058&r1=963057&r2=963058&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 12:08:32 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.amber.signature;
 
-import java.net.URL;
+import java.net.URI;
 import java.util.Collection;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -35,7 +35,7 @@ final class FakeOAuthRequest implements 
 
     private HTTPMethod httpMethod;
 
-    private URL requestURL;
+    private URI requestURL;
 
     private final SortedSet<OAuthMessageParameter> messageParameters = new TreeSet<OAuthMessageParameter>();
 
@@ -65,11 +65,11 @@ final class FakeOAuthRequest implements 
         return this.requestParameters;
     }
 
-    public URL getRequestURL() {
+    public URI getRequestURL() {
         return this.requestURL;
     }
 
-    public void setRequestURL(URL requestURL) {
+    public void setRequestURL(URI requestURL) {
         this.requestURL = requestURL;
     }
 

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=963058&r1=963057&r2=963058&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 12:08:32 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.amber;
 
-import java.net.URL;
+import java.net.URI;
 import java.util.Collection;
 
 /**
@@ -27,9 +27,9 @@ import java.util.Collection;
  */
 public interface OAuthRequest {
 
-    URL getRequestURL();
+    URI getRequestURL();
 
-    void setRequestURL(URL requestURL);
+    void setRequestURL(URI requestURL);
 
     HTTPMethod getHTTPMethod();
 



Mime
View raw message