Update call deprecated in Java 9
This commit is contained in:
@@ -329,7 +329,7 @@ public abstract class LogFactory {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final Class implementationClass = Class.forName(storeImplementationClass);
|
final Class implementationClass = Class.forName(storeImplementationClass);
|
||||||
result = (Hashtable) implementationClass.newInstance();
|
result = (Hashtable) implementationClass.getConstructor().newInstance();
|
||||||
} catch (final Throwable t) {
|
} catch (final Throwable t) {
|
||||||
handleThrowable(t); // may re-throw t
|
handleThrowable(t); // may re-throw t
|
||||||
|
|
||||||
@@ -1046,7 +1046,7 @@ public abstract class LogFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (LogFactory) logFactoryClass.newInstance();
|
return (LogFactory) logFactoryClass.getConstructor().newInstance();
|
||||||
|
|
||||||
} catch (final ClassNotFoundException ex) {
|
} catch (final ClassNotFoundException ex) {
|
||||||
if (classLoader == thisClassLoaderRef.get()) {
|
if (classLoader == thisClassLoaderRef.get()) {
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public class LoadTestCase extends TestCase{
|
|||||||
|
|
||||||
|
|
||||||
private void execute(final Class cls) throws Exception {
|
private void execute(final Class cls) throws Exception {
|
||||||
cls.newInstance();
|
cls.getConstructor().newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ public class SecurityForbiddenTestCase extends TestCase
|
|||||||
private Object loadClass(final String name, final ClassLoader classLoader) {
|
private Object loadClass(final String name, final ClassLoader classLoader) {
|
||||||
try {
|
try {
|
||||||
final Class clazz = classLoader.loadClass(name);
|
final Class clazz = classLoader.loadClass(name);
|
||||||
final Object obj = clazz.newInstance();
|
final Object obj = clazz.getConstructor().newInstance();
|
||||||
return obj;
|
return obj;
|
||||||
} catch ( final Exception e ) {
|
} catch ( final Exception e ) {
|
||||||
final StringWriter sw = new StringWriter();
|
final StringWriter sw = new StringWriter();
|
||||||
|
|||||||
Reference in New Issue
Block a user