summaryrefslogtreecommitdiffstats
path: root/jdisc_core_test
diff options
context:
space:
mode:
authorgjoranv <gv@oath.com>2018-05-03 13:16:08 +0200
committergjoranv <gv@oath.com>2018-05-03 15:31:51 +0200
commit45412aa2ca2eed6aee8a36473fa435e32bebed6b (patch)
tree3a3fd53ac3d8ef52025dbe512e1e1ccde54e0fde /jdisc_core_test
parente239b38f254c8f63f0e14038ca61358f68396868 (diff)
Java 9: Class.newInstance() is deprecated.
Diffstat (limited to 'jdisc_core_test')
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
index 6dec6cb444b..7995def7045 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java
@@ -196,7 +196,7 @@ public class FelixFrameworkIntegrationTest {
private static int callClass(Bundle bundle, String className) throws Exception {
Class<?> certClass = bundle.loadClass(className);
assertNotNull(certClass);
- Callable<Integer> cert = (Callable<Integer>)certClass.newInstance();
+ Callable<Integer> cert = (Callable<Integer>)certClass.getDeclaredConstructor().newInstance();
assertNotNull(cert);
return cert.call();
}
@@ -214,7 +214,7 @@ public class FelixFrameworkIntegrationTest {
assertEquals(Arrays.asList(expectedBundles), actual);
felix.startBundles(bundles, false);
if (className != null) {
- assertNotNull(bundles.get(0).loadClass(className).newInstance());
+ assertNotNull(bundles.get(0).loadClass(className).getDeclaredConstructor().newInstance());
}
} finally {
felix.stop();