abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1229743 - in /abdera/abdera2: common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java common/src/main/java/org/apache/abdera2/common/io/Compression.java core/src/main/java/org/apache/abdera2/parser/axiom/FOMWriter.java
Date Tue, 10 Jan 2012 21:16:44 GMT
Author: jmsnell
Date: Tue Jan 10 21:16:43 2012
New Revision: 1229743

URL: http://svn.apache.org/viewvc?rev=1229743&view=rev
Log:
couple of bug fixes

Modified:
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/Compression.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMWriter.java

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java?rev=1229743&r1=1229742&r2=1229743&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java (original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java Tue
Jan 10 21:16:43 2012
@@ -172,6 +172,15 @@ public final class OAuthUtil {
       return this;
     }
     
+    public OAuth1HeaderBuilder callback(String uri) {
+      return callback(new IRI(uri));
+    }
+    
+    public OAuth1HeaderBuilder callback(IRI iri) {
+      builder.put("oauth_callback", iri.toASCIIString());
+      return this;
+    }
+    
     public OAuth1HeaderBuilder plainText() {
       this.method = OAuth1SignatureMethod.PLAINTEXT;
       return signatureMethod(this.method.label());

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/Compression.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/Compression.java?rev=1229743&r1=1229742&r2=1229743&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/Compression.java (original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/Compression.java Tue
Jan 10 21:16:43 2012
@@ -116,7 +116,7 @@ public class Compression {
       CompressionCodec... codecs)
       throws IOException {
       checkNotNull(in);
-      checkCodecs(codecs.length > 0);
+      if (codecs == null || codecs.length == 0) return in;
       for (int n = codecs.length - 1; n >= 0; n--)
         in = codecs[n].wrap(in);
       return in;

Modified: abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMWriter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMWriter.java?rev=1229743&r1=1229742&r2=1229743&view=diff
==============================================================================
--- abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMWriter.java (original)
+++ abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMWriter.java Tue Jan
10 21:16:43 2012
@@ -81,7 +81,7 @@ public class FOMWriter extends AbstractW
 
     public void writeTo(Base base, Writer out, WriterOptions options) throws IOException
{
         base.writeTo(out);
-        if (options.getAutoClose())
+        if (options != null && options.getAutoClose())
             out.close();
     }
 



Mime
View raw message