Skip to content

Commit 31e87cb

Browse files
committed
Update call deprecated in Java 9
1 parent c578031 commit 31e87cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/cli/TypeHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static Object createObject(final String classname) throws ParseException
117117
}
118118

119119
try {
120-
return cl.newInstance();
120+
return cl.getConstructor().newInstance();
121121
} catch (final Exception e) {
122122
throw new ParseException(e.getClass().getName() + "; Unable to create an instance of: " + classname);
123123
}

0 commit comments

Comments
 (0)