You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-core/src/main/kotlin/com/netflix/graphql/dgs/codegen/generators/java/DataTypeGenerator.kt
+1-14Lines changed: 1 addition & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -860,20 +860,7 @@ abstract class BaseDataTypeGenerator(
860
860
861
861
for (fieldDefinition in fieldDefinitions) {
862
862
val sanitizedName = javaReservedKeywordSanitizer.sanitize(fieldDefinition.name)
863
-
864
-
if (config.generateJSpecifyAnnotations &&!fieldDefinition.nullable) {
865
-
// Wrap non-nullable field assignments in Objects.requireNonNull for runtime validation
866
-
buildMethod.addStatement(
867
-
"result.\$N = \$T.requireNonNull(this.\$N, \$S)",
868
-
sanitizedName,
869
-
Objects::class.java,
870
-
sanitizedName,
871
-
"$sanitizedName cannot be null",
872
-
)
873
-
} else {
874
-
// Direct assignment for nullable fields or when JSpecify is disabled
0 commit comments