[Java] fix default value for JsonNullable (#14703)

* fix java webclient default value

* update default value in java okhttp client

* fix java native client default value in JsonNullable

* improve java okhttp-gson default value template

* update java rest-related templates

* update feign samples

* update jersey3 templates

* update jersey2 templates

* update default value in jaxrs templates

* fix spring default value

* update jaxrs pojo, fix tests

* update samples

* suport set
This commit is contained in:
William Cheng
2023-02-16 10:37:36 +08:00
committed by GitHub
parent 8b0b4b5d04
commit 71c2abf81c
230 changed files with 645 additions and 839 deletions

View File

@@ -282,7 +282,7 @@ public class DefaultValue {
public DefaultValue addArrayStringNullableItem(String arrayStringNullableItem) {
if (this.arrayStringNullable == null || !this.arrayStringNullable.isPresent()) {
this.arrayStringNullable = JsonNullable.<List<String>>of(null);
this.arrayStringNullable = JsonNullable.<List<String>>of(new ArrayList<>());
}
try {
this.arrayStringNullable.get().add(arrayStringNullableItem);