MINOR: Remove duplicate empty string check (#13145)

Reviewers: Chris Egerton <fearthecellos@gmail.com>, Christo Lolov <christololov@gmail.com>
This commit is contained in:
Mickael Maison 2023-02-27 14:49:12 +01:00 committed by GitHub
parent 461c5cfe05
commit 8d7d563231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -58,9 +58,6 @@ public class SimpleHeaderConverter implements HeaderConverter {
} }
try { try {
String str = new String(value, UTF_8); String str = new String(value, UTF_8);
if (str.isEmpty()) {
return new SchemaAndValue(Schema.STRING_SCHEMA, str);
}
return Values.parseString(str); return Values.parseString(str);
} catch (NoSuchElementException e) { } catch (NoSuchElementException e) {
throw new DataException("Failed to deserialize value for header '" + headerKey + "' on topic '" + topic + "'", e); throw new DataException("Failed to deserialize value for header '" + headerKey + "' on topic '" + topic + "'", e);