Replace use of deprecated Class.newInstance()

This commit is contained in:
Alexej Timonin 2024-07-23 23:00:28 +02:00
parent ea2b4f817a
commit 3919614ad4
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ public abstract class DataFileGenerator extends org.junit.Assert {
String cn = file.getName();
cn = cn.substring(0, cn.length() - ".java".length());
Class<?> clazz = DataFileGenerator.class.getClassLoader().loadClass("org.apache.activemq.openwire." + cn);
l.add((DataFileGenerator)clazz.newInstance());
l.add((DataFileGenerator)clazz.getDeclaredConstructor().newInstance());
}
}
return l;