From 45412aa2ca2eed6aee8a36473fa435e32bebed6b Mon Sep 17 00:00:00 2001 From: gjoranv Date: Thu, 3 May 2018 13:16:08 +0200 Subject: Java 9: Class.newInstance() is deprecated. --- .../test/java/com/yahoo/jdisc/core/FelixFrameworkIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'jdisc_core_test') 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 cert = (Callable)certClass.newInstance(); + Callable cert = (Callable)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(); -- cgit v1.2.3