Don't catch API 19 exception from newInstance.

This commit is contained in:
Oliver Woodman 2015-07-23 13:12:57 +01:00
parent a44a78c72d
commit 4c1fb0c977
2 changed files with 6 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}