MINOR: Fix error message in exception when records have schemas in Connect's Flatten transformation (#3982)

In case of an error while flattening a record with schema, the Flatten transformation was reporting an error about a record without schema, as follows: 

```
org.apache.kafka.connect.errors.DataException: Flatten transformation does not support ARRAY for record without schemas (for field ...)
```

The expected behaviour would be an error message specifying "with schemas". 

This looks like a simple copy/paste typo from the schemaless equivalent methods, in the same file 

Reviewers: Ewen Cheslack-Postava <me@ewencp.org>, Konstantine Karantasis <konstantine@confluent.io>
This commit is contained in:
Svend Vanderveken 2020-03-29 06:28:06 +02:00 committed by Konstantine Karantasis
parent aabc470c02
commit 63a76f8cc4
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ public abstract class Flatten<R extends ConnectRecord<R>> implements Transformat
break;
default:
throw new DataException("Flatten transformation does not support " + field.schema().type()
+ " for record without schemas (for field " + fieldName + ").");
+ " for record with schemas (for field " + fieldName + ").");
}
}
}
@ -242,7 +242,7 @@ public abstract class Flatten<R extends ConnectRecord<R>> implements Transformat
break;
default:
throw new DataException("Flatten transformation does not support " + field.schema().type()
+ " for record without schemas (for field " + fieldName + ").");
+ " for record with schemas (for field " + fieldName + ").");
}
}
}