Java 17 features (#15493)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -71,9 +71,8 @@ public class PicoTTSService extends AbstractCachedTTSService {
|
||||
throw new TTSException("The passed voice is unsupported");
|
||||
}
|
||||
|
||||
boolean isAudioFormatSupported = this.audioFormats.stream().anyMatch(audioFormat -> {
|
||||
return audioFormat.isCompatible(requestedFormat);
|
||||
});
|
||||
boolean isAudioFormatSupported = this.audioFormats.stream()
|
||||
.anyMatch(audioFormat -> audioFormat.isCompatible(requestedFormat));
|
||||
|
||||
if (!isAudioFormatSupported) {
|
||||
throw new TTSException("The passed AudioFormat is unsupported");
|
||||
|
||||
Reference in New Issue
Block a user