[googletts] Avoid UnsupportedOperationException during dispose (#15305)

Fix #15303

It is not allowed to clear an unmodified hash set.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2023-07-25 23:54:31 +02:00 committed by Jacob Laursen
parent 4fe1f76444
commit fdb10451ec

View File

@ -136,8 +136,8 @@ public class GoogleTTSService extends AbstractCachedTTSService {
@Deactivate
protected void dispose() {
apiImpl.dispose();
audioFormats.clear();
allVoices.clear();
audioFormats = new HashSet<>();
allVoices = new HashSet<>();
}
/**