Bugfix
This commit is contained in:
parent
379c9065ee
commit
43358ee299
@ -2353,7 +2353,8 @@ public class SourcesGenerator {
|
|||||||
var oldIType = ClassName.get(joinPackage(versionPackage, "data"), "IType");
|
var oldIType = ClassName.get(joinPackage(versionPackage, "data"), "IType");
|
||||||
deserializeMethod.addStatement("$T.requireNonNull(value)", Objects.class);
|
deserializeMethod.addStatement("$T.requireNonNull(value)", Objects.class);
|
||||||
deserializeMethod.addStatement("var content = value.$$getNullable()");
|
deserializeMethod.addStatement("var content = value.$$getNullable()");
|
||||||
deserializeMethod.addStatement("var newContent = ($T) $T.upgradeToNextVersion(($T) content)",
|
deserializeMethod.addStatement("var newContent = content == null ? null : $T.requireNonNull(($T) $T.upgradeToNextVersion(($T) content))",
|
||||||
|
ClassName.get(Objects.class),
|
||||||
toGenericType,
|
toGenericType,
|
||||||
oldVersionType,
|
oldVersionType,
|
||||||
oldIBasicType
|
oldIBasicType
|
||||||
@ -2391,7 +2392,8 @@ public class SourcesGenerator {
|
|||||||
var oldIType = ClassName.get(joinPackage(versionPackage, "data"), "IType");
|
var oldIType = ClassName.get(joinPackage(versionPackage, "data"), "IType");
|
||||||
deserializeMethod.addStatement("$T.requireNonNull(value)", Objects.class);
|
deserializeMethod.addStatement("$T.requireNonNull(value)", Objects.class);
|
||||||
deserializeMethod.addStatement("var content = value.$$getNullable()");
|
deserializeMethod.addStatement("var content = value.$$getNullable()");
|
||||||
deserializeMethod.addStatement("var newContent = ($T) $T.upgradeToNextVersion(($T) content)",
|
deserializeMethod.addStatement("var newContent = content == null ? null : $T.requireNonNull(($T) $T.upgradeToNextVersion(($T) content))",
|
||||||
|
ClassName.get(Objects.class),
|
||||||
toBasicType,
|
toBasicType,
|
||||||
oldVersionType,
|
oldVersionType,
|
||||||
oldIBasicType
|
oldIBasicType
|
||||||
|
Loading…
Reference in New Issue
Block a user