Skip to content

Commit ea0aa79

Browse files
committed
[cli-protonj2] Handle sending null values as properties, etc...
1 parent beb03d7 commit ea0aa79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/main/java/com/redhat/mqe/lib/Content.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ public Content(String contentType, String parsedValue, boolean isMap) {
7676
this.key = parsedValue.substring(0, parsedValue.indexOf(splitter));
7777
val = parsedValue.substring(parsedValue.indexOf(splitter) + 1);
7878
} else {
79-
if (parsedValue.startsWith("~~")) {
79+
if (parsedValue == null) {
80+
this.type = void.class;
81+
this.value = null;
82+
return;
83+
} else if (parsedValue.startsWith("~~")) {
8084
contentType = "String";
8185
}
8286
this.type = Utils.getClassType(contentType, parsedValue, true);

0 commit comments

Comments
 (0)