diff --git a/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/StringListView.java b/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/StringListView.java index f157be3b..965db29c 100644 --- a/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/StringListView.java +++ b/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/StringListView.java @@ -65,32 +65,12 @@ public boolean add(Utf8 element) { @Override public boolean addAll(int index, java.util.Collection c) { boolean modified = false; - for (String element : c) { - _utf8List.add(index++, new Utf8(element)); - modified = true; - } - return modified; - } - - /** - * Overloaded method to add all Utf8 elements of a collection at a specific index. - */ - public boolean addAll(int index, java.util.List c) { - boolean modified = false; - for (Utf8 element : c) { - _utf8List.add(index++, element); - modified = true; - } - return modified; - } - - /** - * Overloaded method to add all Utf8 elements of a set at a specific index. - */ - public boolean addAll(int index, java.util.Set c) { - boolean modified = false; - for (Utf8 element : c) { - _utf8List.add(index++, element); + for (Object element : c) { + if (element instanceof Utf8) { + _utf8List.add(index++, (Utf8) element); + } else { + _utf8List.add(index++, new Utf8(String.valueOf(element))); + } modified = true; } return modified;