Skip to content

Commit

Permalink
sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
loicgreffier committed Jan 27, 2024
1 parent 202df94 commit 3baf497
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ public List<SchemaReference> getReferences(Schema schema) {
*/
public Mono<Boolean> existInOldVersions(Namespace namespace, Schema schema, List<Schema> oldSchemas) {
return getSchemaReferences(schema, namespace)
.flatMap(schemaRefs -> {
.flatMap(schemaRefs ->
// If new schema matches any of the existing schemas, return unchanged
return Flux.fromIterable(oldSchemas)
Flux.fromIterable(oldSchemas)
.flatMap(oldSchema -> getSchemaReferences(oldSchema, namespace)
.map(oldSchemaRefs -> {
var currentSchema = new AvroSchema(oldSchema.getSpec().getSchema(),
Expand All @@ -351,7 +351,7 @@ public Mono<Boolean> existInOldVersions(Namespace namespace, Schema schema, List
currentSchema.canonicalString())
&& Objects.equals(newSchema.references(), currentSchema.references());
}))
.any(subjectComparison -> subjectComparison);
});
.any(subjectComparison -> subjectComparison)
);
}
}

0 comments on commit 3baf497

Please sign in to comment.