Use getConstructor().newInstance() in ExtractorSampleSource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126306436
This commit is contained in:
andrewlewis 2016-06-30 08:44:39 -07:00 committed by Oliver Woodman
parent 2e77f02e7e
commit a476e090bc

View File

@ -296,7 +296,7 @@ public final class ExtractorSampleSource implements SampleSource, ExtractorOutpu
Extractor[] extractors = new Extractor[defaultExtractorClasses.size()];
for (int i = 0; i < extractors.length; i++) {
try {
extractors[i] = defaultExtractorClasses.get(i).newInstance();
extractors[i] = defaultExtractorClasses.get(i).getConstructor().newInstance();
} catch (Exception e) {
// Should never happen.
throw new IllegalStateException("Unexpected error creating default extractor", e);