try {
if (eventArgumentIndex >= 0) {
if (eventArgumentIndex == 0 && arguments.length == 1) {
- method.invoke(target, new Object[] { event });
+ method.invoke(target, event);
} else {
final Object[] arg = new Object[arguments.length];
System.arraycopy(arguments, 0, arg, 0, arg.length);
Method method = targetClass.getMethod(methodName,
parameterClass);
- return method.invoke(null, new Object[] { argument });
+ return method.invoke(null, argument);
} catch (InvocationTargetException ite) {
throw (Exception) ite.getCause();
} finally {
Class<?> portletRequestClass = Class.forName(
"com.bea.portlet.container.PortletRequestImpl");
servletRequestMethod = portletRequestClass
- .getDeclaredMethod("getInternalRequest",
- new Class[] {});
+ .getDeclaredMethod("getInternalRequest"
+ );
servletRequestMethod.setAccessible(true);
}
final Class<?> classLoaderClass = getClass().getClassLoader()
.loadClass(classLoaderName);
final Constructor<?> c = classLoaderClass
- .getConstructor(new Class[] { ClassLoader.class });
+ .getConstructor(ClassLoader.class);
setClassLoader((ClassLoader) c.newInstance(
- new Object[] { getClass().getClassLoader() }));
+ getClass().getClassLoader()));
} catch (final Exception e) {
throw new RuntimeException(
"Could not find specified class loader: "
try {
POPUP_VISIBILITY_METHOD = PopupVisibilityListener.class
.getDeclaredMethod("popupVisibilityChange",
- new Class[] { PopupVisibilityEvent.class });
+ PopupVisibilityEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
try {
SELECTED_TAB_CHANGE_METHOD = SelectedTabChangeListener.class
.getDeclaredMethod("selectedTabChange",
- new Class[] { SelectedTabChangeEvent.class });
+ SelectedTabChangeEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
static {
try {
UPLOAD_FINISHED_METHOD = FinishedListener.class.getDeclaredMethod(
- "uploadFinished", new Class[] { FinishedEvent.class });
+ "uploadFinished", FinishedEvent.class);
UPLOAD_FAILED_METHOD = FailedListener.class.getDeclaredMethod(
- "uploadFailed", new Class[] { FailedEvent.class });
+ "uploadFailed", FailedEvent.class);
UPLOAD_STARTED_METHOD = StartedListener.class.getDeclaredMethod(
- "uploadStarted", new Class[] { StartedEvent.class });
+ "uploadStarted", StartedEvent.class);
UPLOAD_SUCCEEDED_METHOD = SucceededListener.class.getDeclaredMethod(
- "uploadSucceeded", new Class[] { SucceededEvent.class });
+ "uploadSucceeded", SucceededEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
static {
try {
WINDOW_CLOSE_METHOD = CloseListener.class.getDeclaredMethod(
- "windowClose", new Class[] { CloseEvent.class });
+ "windowClose", CloseEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
static {
try {
WINDOW_RESIZE_METHOD = ResizeListener.class.getDeclaredMethod(
- "windowResized", new Class[] { ResizeEvent.class });
+ "windowResized", ResizeEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
public class AbstractOrderedLayoutDeclarativeTest
extends DeclarativeMarginTestBase<AbstractOrderedLayout> {
- private List<String> defaultAlignments = Arrays
- .asList(new String[] { ":top", ":left" });
+ private List<String> defaultAlignments = Arrays.asList(":top", ":left");
@Test
public void testMargins() {