cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/2] cxf git commit: Completing the NPE checking code in the basic json writer
Date Fri, 02 Dec 2016 16:50:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 7a9896006 -> 08911629e


Completing the NPE checking code in the basic json writer


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d99c9ad3
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d99c9ad3
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d99c9ad3

Branch: refs/heads/master
Commit: d99c9ad353894b95b6ae866a7e63b9dbb8a0665c
Parents: 4dcf512
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Dec 2 16:50:13 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Dec 2 16:50:13 2016 +0000

----------------------------------------------------------------------
 .../apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d99c9ad3/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
index d1fb1f5..abf6eef 100644
--- a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
+++ b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
@@ -305,6 +305,9 @@ public class JsonMapObjectReaderWriter {
         @Override
         public Output append(String str) {
             try {
+                if (str == null) {
+                    str = "null";
+                }
                 os.write(StringUtils.toBytesUTF8(str));
             } catch (IOException ex) {
                 throw new RuntimeException(ex);


Mime
View raw message