abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r711347 - /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractStreamWriter.java
Date Tue, 04 Nov 2008 18:37:44 GMT
Author: calavera
Date: Tue Nov  4 10:37:43 2008
New Revision: 711347

URL: http://svn.apache.org/viewvc?rev=711347&view=rev
Log:
[ABDERA-203]: Out of line categories incorrectly serialized. Thanks to Adam Constabaris.

we won't write "fixes" attribute when it's value is "no" nor the "scheme" attribute when it's
value is null.


Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractStreamWriter.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractStreamWriter.java?rev=711347&r1=711346&r2=711347&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractStreamWriter.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbstractStreamWriter.java
Tue Nov  4 10:37:43 2008
@@ -585,9 +585,14 @@
   }
   
   public StreamWriter startCategories(boolean fixed, String scheme) {
-    return startElement(Constants.CATEGORIES).
-      writeAttribute("fixed",fixed?"yes":"no").
-      writeAttribute("scheme",scheme);
+	  startElement(Constants.CATEGORIES);
+	  if (fixed) {
+		  writeAttribute("fixed", "yes");
+	  }
+	  if (scheme != null && scheme.length() > 0) {
+		  writeAttribute("scheme",scheme);
+	  }
+	  return this;
   }
   
   public StreamWriter endCategories() {



Mime
View raw message