[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 GitHub
parent 33dd5e7f70
commit 6dccbcb005

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<>();
}
/**