forked from I2P_Developers/i2p.i2p
Class generics
This commit is contained in:
@@ -832,7 +832,7 @@ public class PluginStarter implements Runnable {
|
||||
*/
|
||||
private static void addPath(URL u) throws Exception {
|
||||
URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
|
||||
Class urlClass = URLClassLoader.class;
|
||||
Class<URLClassLoader> urlClass = URLClassLoader.class;
|
||||
Method method = urlClass.getDeclaredMethod("addURL", new Class[]{URL.class});
|
||||
method.setAccessible(true);
|
||||
method.invoke(urlClassLoader, new Object[]{u});
|
||||
|
@@ -46,7 +46,7 @@ public class EncodingFactory {
|
||||
String[] classNames = list.split( ";" );
|
||||
for( int i = 0; i < classNames.length; i++ ) {
|
||||
try {
|
||||
Class c = Class.forName( classNames[i] );
|
||||
Class<?> c = Class.forName( classNames[i] );
|
||||
Encoding e = (Encoding)c.newInstance();
|
||||
encodings.put( e.getName(), e );
|
||||
Debug.debug( Debug.DEBUG, "Registered " + e.getClass().getName() );
|
||||
|
Reference in New Issue
Block a user