KAFKA-7047: Added SimpleHeaderConverter to plugin isolation whitelist

This was originally missed when headers were added as part of KIP-145 in AK 1.1. An additional unit test was added in line with the StringConverter.

This should be backported to the AK `1.1` branch so that it is included in the next bugfix release. The `SimpleHeaderConverter` class that we're referencing was first added in the 1.1.0 release, so there's no reason to backport earlier.

Author: Randall Hauch <rhauch@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5204 from rhauch/kafka-7047
This commit is contained in:
Randall Hauch 2018-06-16 22:23:20 -07:00 committed by Ewen Cheslack-Postava
parent 73112f1137
commit bca1eaff8c
2 changed files with 4 additions and 0 deletions

View File

@ -128,6 +128,7 @@ public class PluginUtils {
+ "|file\\..*"
+ "|converters\\..*"
+ "|storage\\.StringConverter"
+ "|storage\\.SimpleHeaderConverter"
+ ")$";
private static final DirectoryStream.Filter<Path> PLUGIN_PATH_FILTER = new DirectoryStream

View File

@ -146,6 +146,9 @@ public class PluginUtilsTest {
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.StringConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.SimpleHeaderConverter")
);
}
@Test