Ignore:
Timestamp:
08/01/19 12:11:21 (5 years ago)
Author:
pharms
Message:

Update to java 11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java

    r2233 r2260  
    2020import java.io.FilenameFilter; 
    2121import java.io.IOException; 
     22import java.lang.reflect.InvocationTargetException; 
    2223import java.net.URL; 
    2324import java.util.ArrayList; 
     
    189190        try { 
    190191            Class<?> cmdClass = Class.forName(className); 
    191             cmd = (Command) cmdClass.newInstance(); 
     192            cmd = (Command) cmdClass.getDeclaredConstructor().newInstance(); 
    192193        } 
    193194        catch (NoClassDefFoundError e) { 
     
    199200        catch (IllegalAccessException e) {} 
    200201        catch (InstantiationException e) {} 
     202        catch (InvocationTargetException e) {} 
     203        catch (NoSuchMethodException e) {} 
    201204        catch (ClassCastException e) { 
    202205            Console.traceln(Level.WARNING, className + "found, but does not implement Command"); 
Note: See TracChangeset for help on using the changeset viewer.