This commit is contained in:
Andrea Cavalli 2022-05-05 15:44:22 +02:00
parent 1a0428fb99
commit fed9d27a37

View File

@ -959,7 +959,7 @@ public class SourcesGenerator {
var orMethodGeneric = MethodSpec.methodBuilder("or"); var orMethodGeneric = MethodSpec.methodBuilder("or");
orMethodGeneric.addParameter(ParameterSpec orMethodGeneric.addParameter(ParameterSpec
.builder(ParameterizedTypeName.get( .builder(ParameterizedTypeName.get(
ClassName.get("it.cavallium.data.generator", "NativeTypedNullable"), ClassName.get("it.cavallium.data.generator", "NativeNullable"),
WildcardTypeName.subtypeOf(typeType)), "fallback") WildcardTypeName.subtypeOf(typeType)), "fallback")
.addAnnotation(NotNull.class) .addAnnotation(NotNull.class)
.build()); .build());
@ -985,7 +985,6 @@ public class SourcesGenerator {
.build()); .build());
orMethodSpecific.addModifiers(Modifier.PUBLIC); orMethodSpecific.addModifiers(Modifier.PUBLIC);
orMethodSpecific.addModifiers(Modifier.FINAL); orMethodSpecific.addModifiers(Modifier.FINAL);
orMethodSpecific.addAnnotation(Override.class);
orMethodSpecific.addAnnotation(NotNull.class); orMethodSpecific.addAnnotation(NotNull.class);
orMethodSpecific.returns(nullableClassType); orMethodSpecific.returns(nullableClassType);
orMethodSpecific.beginControlFlow("if (value == null)"); orMethodSpecific.beginControlFlow("if (value == null)");