Skip to content

Commit 4b7f7bf

Browse files
marinov-codeVENTSISLAV MARINOV
andauthored
GEODE-10533: Fix Deprecated APIs in geode-gfsh Module (#8001)
Co-authored-by: VENTSISLAV MARINOV <ventsislav.marinov@sas.com>
1 parent af12f17 commit 4b7f7bf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/CreateAsyncEventQueueFunction.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package org.apache.geode.management.internal.cli.functions;
1616

17+
import java.lang.reflect.InvocationTargetException;
1718
import java.util.HashMap;
1819
import java.util.List;
1920
import java.util.Map;
@@ -152,11 +153,12 @@ private void legacyInit(Declarable listenerInstance, Properties listenerProperti
152153
}
153154

154155
private Object newInstance(String className)
155-
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
156+
throws ClassNotFoundException, IllegalAccessException, InstantiationException,
157+
NoSuchMethodException, InvocationTargetException {
156158
if (Strings.isNullOrEmpty(className)) {
157159
return null;
158160
}
159161

160-
return ClassPathLoader.getLatest().forName(className).newInstance();
162+
return ClassPathLoader.getLatest().forName(className).getDeclaredConstructor().newInstance();
161163
}
162164
}

0 commit comments

Comments
 (0)