abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r517359 - /incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
Date Mon, 12 Mar 2007 19:58:44 GMT
Author: jmsnell
Date: Mon Mar 12 12:58:44 2007
New Revision: 517359

URL: http://svn.apache.org/viewvc?view=rev&rev=517359
Log:
Do not encode/decode null values

Modified:
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java?view=diff&rev=517359&r1=517358&r2=517359
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
Mon Mar 12 12:58:44 2007
@@ -58,6 +58,7 @@
    * @param charset The character set to use for the encoding
    */
   public static String encode(String value, String charset) {
+    if (value == null) return null;
     try {
       return (new QCodec(charset)).encode(value);
     } catch (Exception e) {
@@ -70,6 +71,7 @@
    * @param value The encoded string
    */
   public static String decode(String value) {
+    if (value == null) return null;
     try {
       return (new QCodec()).decode(value);
     } catch (Exception e) {



Mime
View raw message