Skip to content

Commit 645f407

Browse files
committed
Replace deprecated newInstance() method
1 parent ea0b5a9 commit 645f407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/edu/stanford/nlp/parser/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private static ParserPack loadParserPack(String parser, ServletContext applicati
6363
// load parser
6464
ParserPack pp = new ParserPack();
6565
pp.escaper = (Function<List<HasWord>, List<HasWord>>)
66-
Class.forName(nameToEscaper.get(parser)).newInstance();
66+
Class.forName(nameToEscaper.get(parser)).getDeclaredConstructor().newInstance();
6767
pp.parser = LexicalizedParser.loadModel(serializedParserPath);
6868
pp.tLP = pp.parser.getOp().tlpParams.treebankLanguagePack();
6969
pp.tagPrint = new TreePrint("wordsAndTags", pp.tLP);

0 commit comments

Comments
 (0)