Class generics

This commit is contained in:
str4d
2013-11-24 23:41:06 +00:00
parent e1fcad686c
commit c6f2d4948b
12 changed files with 32 additions and 32 deletions

View File

@@ -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});

View File

@@ -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() );