1
0

Simplify weird code

This commit is contained in:
Gary Gregory
2023-11-25 12:16:31 -05:00
parent a5b6ec6522
commit 09e85b177c

View File

@@ -206,9 +206,7 @@ public class LogSource {
*/
static public void setLogImplementation(final Class<?> logClass)
throws LinkageError, ExceptionInInitializerError, NoSuchMethodException, SecurityException {
final Class<?>[] argTypes = new Class[1];
argTypes[0] = "".getClass();
logImplctor = logClass.getConstructor(argTypes);
logImplctor = logClass.getConstructor(new Class<?>[] { String.class });
}
/**
@@ -224,9 +222,7 @@ public class LogSource {
static public void setLogImplementation(final String className) throws LinkageError, SecurityException {
try {
final Class<?> logClass = Class.forName(className);
final Class<?>[] argTypes = new Class[1];
argTypes[0] = "".getClass();
logImplctor = logClass.getConstructor(argTypes);
logImplctor = logClass.getConstructor(new Class<?>[] { String.class });
} catch (final Throwable t) {
logImplctor = null;
}