Merge remote-tracking branch 'origin/master' into 5.0.x

This commit is contained in:
William Cheng
2020-02-04 15:31:10 +08:00
1179 changed files with 58478 additions and 9334 deletions

View File

@@ -563,7 +563,7 @@ public class ApiClient {
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
} else {
// We let jersey handle the serialization
entity = Entity.entity(obj, contentType);
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
}
return entity;
}
@@ -716,7 +716,7 @@ public class ApiClient {
}
}
Entity<?> entity = (body == null) ? Entity.json("") : serialize(body, formParams, contentType);
Entity<?> entity = serialize(body, formParams, contentType);
Response response = null;

View File

@@ -33,7 +33,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Animal.JSON_PROPERTY_COLOR
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),