Commit 4c1fb0c9 by Oliver Woodman

Don't catch API 19 exception from newInstance.

parent a44a78c7
......@@ -247,7 +247,9 @@ public class ExtractorSampleSource implements SampleSource, SampleSourceReader,
for (int i = 0; i < extractors.length; i++) {
try {
extractors[i] = DEFAULT_EXTRACTOR_CLASSES.get(i).newInstance();
} catch (ReflectiveOperationException e) {
} catch (InstantiationException e) {
throw new IllegalStateException("Unexpected error creating default extractor", e);
} catch (IllegalAccessException e) {
throw new IllegalStateException("Unexpected error creating default extractor", e);
}
}
......
......@@ -141,7 +141,9 @@ public class TextTrackRenderer extends TrackRenderer implements Callback {
for (int i = 0; i < subtitleParsers.length; i++) {
try {
subtitleParsers[i] = DEFAULT_PARSER_CLASSES.get(i).newInstance();
} catch (ReflectiveOperationException e) {
} catch (InstantiationException e) {
throw new IllegalStateException("Unexpected error creating default parser", e);
} catch (IllegalAccessException e) {
throw new IllegalStateException("Unexpected error creating default parser", e);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment