mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 15:35:36 +00:00
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();
|
String cn = file.getName();
|
||||||
cn = cn.substring(0, cn.length() - ".java".length());
|
cn = cn.substring(0, cn.length() - ".java".length());
|
||||||
Class<?> clazz = DataFileGenerator.class.getClassLoader().loadClass("org.apache.activemq.openwire." + cn);
|
Class<?> clazz = DataFileGenerator.class.getClassLoader().loadClass("org.apache.activemq.openwire." + cn);
|
||||||
l.add((DataFileGenerator)clazz.newInstance());
|
l.add((DataFileGenerator)clazz.getDeclaredConstructor().newInstance());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user