Skip to content

Commit 6012175

Browse files
committed
Fix Sonar issue
1 parent 49d1168 commit 6012175

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/io/github/sashirestela/openai/common/ResponseFormat.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ public JsonSchema(String description, @NonNull String name, Boolean strict, Clas
6767
this.description = description;
6868
this.name = name;
6969
this.strict = strict;
70-
this.schema = schema != null
71-
? schema
72-
: (schemaClass != null
73-
? new DefaultSchemaConverter(Boolean.TRUE).convert(schemaClass)
74-
: null);
70+
if (schema != null) {
71+
this.schema = schema;
72+
} else {
73+
this.schema = schemaClass != null
74+
? new DefaultSchemaConverter(Boolean.TRUE).convert(schemaClass)
75+
: null;
76+
}
7577
}
7678

7779
}

0 commit comments

Comments
 (0)