mirror of https://github.com/apache/activemq.git
Replace use of deprecated Class.newInstance()
This commit is contained in:
parent
ea2b4f817a
commit
3919614ad4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue