mirror of https://github.com/sbt/sbt.git
java.lang.Class#newInstance deprecated since Java 9 http://download.java.net/java/jdk9/docs/api/java/lang/Class.html#newInstance-- ``` Deprecated. This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException. The call clazz.newInstance() can be replaced by clazz.getDeclaredConstructor().newInstance() The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException. Creates a new instance of the class represented by this Class object. The class is instantiated as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized. ``` |
||
|---|---|---|
| .. | ||
| ForkConfiguration.java | ||
| ForkMain.java | ||
| ForkTags.java | ||
| FrameworkWrapper.java | ||