From 3fb7d5bdf39a8f12f4243e37709cff2099d647e2 Mon Sep 17 00:00:00 2001 From: Uttam Kumar Date: Wed, 24 Apr 2024 09:43:06 -0700 Subject: [PATCH] Override clear method in custom list views --- .../collectiontransformer/CharSequenceListView.java | 5 +++++ .../compatibility/collectiontransformer/StringListView.java | 5 +++++ .../compatibility/collectiontransformer/Utf8ListView.java | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/CharSequenceListView.java b/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/CharSequenceListView.java index 000c7dfb..c2ad3e6e 100644 --- a/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/CharSequenceListView.java +++ b/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/CharSequenceListView.java @@ -60,4 +60,9 @@ public boolean addAll(int index, java.util.Collection c) public boolean remove(Object o) { return utf8List.remove(new Utf8(o.toString())); } + + @Override + public void clear() { + utf8List.clear(); + } } 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 8fba353f..da9a2c60 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 @@ -61,4 +61,9 @@ public boolean addAll(int index, java.util.Collection c) { public boolean remove(Object o) { return _utf8List.remove(new Utf8(o.toString())); } + + @Override + public void clear() { + _utf8List.clear(); + } } diff --git a/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/Utf8ListView.java b/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/Utf8ListView.java index c3724f6b..af6c2564 100644 --- a/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/Utf8ListView.java +++ b/helper/helper/src/main/java/com/linkedin/avroutil1/compatibility/collectiontransformer/Utf8ListView.java @@ -55,4 +55,9 @@ public boolean addAll(int index, java.util.Collection c) { public boolean remove(Object o) { return utf8List.remove(o); } + + @Override + public void clear() { + utf8List.clear(); + } }