summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java')
-rw-r--r--base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java b/base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java
index 1780bc337..a6051fa8d 100644
--- a/base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java
+++ b/base/common/src/com/netscape/certsrv/request/RequestIdAdapter.java
@@ -19,19 +19,20 @@ package com.netscape.certsrv.request;
import javax.xml.bind.annotation.adapters.XmlAdapter;
+import org.apache.commons.lang.StringUtils;
+
/**
* The RequestIdAdapter class provides custom marshaling for RequestId.
*
* @author Endi S. Dewata
- * @version $Revision$ $Date$
*/
public class RequestIdAdapter extends XmlAdapter<String, RequestId> {
public RequestId unmarshal(String value) throws Exception {
- return new RequestId(value);
+ return StringUtils.isEmpty(value) ? null : new RequestId(value);
}
public String marshal(RequestId value) throws Exception {
- return value.toString();
+ return value == null ? null : value.toString();
}
} \ No newline at end of file