Use varargs.
This commit is contained in:
@@ -106,7 +106,7 @@ public class LoadTestCase extends TestCase{
|
|||||||
private void setAllowFlawedContext(final Class c, final String state) throws Exception {
|
private void setAllowFlawedContext(final Class c, final String state) throws Exception {
|
||||||
final Class[] params = {String.class};
|
final Class[] params = {String.class};
|
||||||
final java.lang.reflect.Method m = c.getDeclaredMethod("setAllowFlawedContext", params);
|
final java.lang.reflect.Method m = c.getDeclaredMethod("setAllowFlawedContext", params);
|
||||||
m.invoke(null, new Object[] {state});
|
m.invoke(null, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ public class SecurityAllowedTestCase extends TestCase
|
|||||||
// initializer for the LogFactory class is executed.
|
// initializer for the LogFactory class is executed.
|
||||||
final Class c = this.getClass().getClassLoader().loadClass(
|
final Class c = this.getClass().getClassLoader().loadClass(
|
||||||
"org.apache.commons.logging.LogFactory");
|
"org.apache.commons.logging.LogFactory");
|
||||||
final Method m = c.getMethod("getLog", new Class[] {Class.class});
|
final Method m = c.getMethod("getLog", Class.class);
|
||||||
final Log log = (Log) m.invoke(null, new Object[] {this.getClass()});
|
final Log log = (Log) m.invoke(null, this.getClass());
|
||||||
|
|
||||||
// Check whether we had any security exceptions so far (which were
|
// Check whether we had any security exceptions so far (which were
|
||||||
// caught by the code). We should not, as every secure operation
|
// caught by the code). We should not, as every secure operation
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ public class SecurityForbiddenTestCase extends TestCase
|
|||||||
// initializer for the LogFactory class is executed.
|
// initializer for the LogFactory class is executed.
|
||||||
final Class c = this.getClass().getClassLoader().loadClass(
|
final Class c = this.getClass().getClassLoader().loadClass(
|
||||||
"org.apache.commons.logging.LogFactory");
|
"org.apache.commons.logging.LogFactory");
|
||||||
final Method m = c.getMethod("getLog", new Class[] {Class.class});
|
final Method m = c.getMethod("getLog", Class.class);
|
||||||
final Log log = (Log) m.invoke(null, new Object[] {this.getClass()});
|
final Log log = (Log) m.invoke(null, this.getClass());
|
||||||
log.info("testing");
|
log.info("testing");
|
||||||
|
|
||||||
// check that the default map implementation was loaded, as JCL was
|
// check that the default map implementation was loaded, as JCL was
|
||||||
|
|||||||
Reference in New Issue
Block a user