From 1439b4a3ef5a31f15553db30071177c115ea12f5 Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Tue, 21 Nov 2017 13:42:12 +0000 Subject: [PATCH] Mini cleanup --- .../google/android/exoplayer2/text/ssa/SsaDecoder.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java b/library/core/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java index 12aa1e97d5..eec4a1269c 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java @@ -53,13 +53,14 @@ public final class SsaDecoder extends SimpleSubtitleDecoder { } /** - * @param initializationData Optional initialization data for the decoder. If not null, the - * initialization data must consist of two byte arrays. The first must contain an SSA format - * line. The second must contain an SSA header that will be assumed common to all samples. + * @param initializationData Optional initialization data for the decoder. If not null or empty, + * the initialization data must consist of two byte arrays. The first must contain an SSA + * format line. The second must contain an SSA header that will be assumed common to all + * samples. */ public SsaDecoder(List initializationData) { super("SsaDecoder"); - if (initializationData != null && initializationData.size() > 0) { + if (initializationData != null && !initializationData.isEmpty()) { haveInitializationData = true; String formatLine = new String(initializationData.get(0)); Assertions.checkArgument(formatLine.startsWith(FORMAT_LINE_PREFIX));