Commit a476e090 by andrewlewis Committed by Oliver Woodman

Use getConstructor().newInstance() in ExtractorSampleSource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126306436
parent 2e77f02e
...@@ -296,7 +296,7 @@ public final class ExtractorSampleSource implements SampleSource, ExtractorOutpu ...@@ -296,7 +296,7 @@ public final class ExtractorSampleSource implements SampleSource, ExtractorOutpu
Extractor[] extractors = new Extractor[defaultExtractorClasses.size()]; Extractor[] extractors = new Extractor[defaultExtractorClasses.size()];
for (int i = 0; i < extractors.length; i++) { for (int i = 0; i < extractors.length; i++) {
try { try {
extractors[i] = defaultExtractorClasses.get(i).newInstance(); extractors[i] = defaultExtractorClasses.get(i).getConstructor().newInstance();
} catch (Exception e) { } catch (Exception e) {
// Should never happen. // Should never happen.
throw new IllegalStateException("Unexpected error creating default extractor", e); throw new IllegalStateException("Unexpected error creating default extractor", 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