Changeset 2260 for trunk/java-utils/src/main/java/de/ugoe
- Timestamp:
- 08/01/19 12:11:21 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java
r2233 r2260 20 20 import java.io.FilenameFilter; 21 21 import java.io.IOException; 22 import java.lang.reflect.InvocationTargetException; 22 23 import java.net.URL; 23 24 import java.util.ArrayList; … … 189 190 try { 190 191 Class<?> cmdClass = Class.forName(className); 191 cmd = (Command) cmdClass. newInstance();192 cmd = (Command) cmdClass.getDeclaredConstructor().newInstance(); 192 193 } 193 194 catch (NoClassDefFoundError e) { … … 199 200 catch (IllegalAccessException e) {} 200 201 catch (InstantiationException e) {} 202 catch (InvocationTargetException e) {} 203 catch (NoSuchMethodException e) {} 201 204 catch (ClassCastException e) { 202 205 Console.traceln(Level.WARNING, className + "found, but does not implement Command");
Note: See TracChangeset
for help on using the changeset viewer.