From 5695aea3bbe719881177b35c805920bee608751b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 18 Jun 2012 11:37:19 +0200 Subject: Add casts to reduce javac warning messages. These warning arise because of the additional of varargs parameters in Java1.6. Casting the parameter eliminates the compiler confusion. Change-Id: I4906bcfa2700ef80a67b79c61c6848a18e8a7168 --- wizards/com/sun/star/wizards/ui/event/DataAware.java | 2 +- wizards/com/sun/star/wizards/ui/event/MethodInvocation.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'wizards/com') diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index 6138286e80c0..98c3ea7f849b 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -313,7 +313,7 @@ public abstract class DataAware { */ public Object get(Object target) { try { - return getMethod.invoke(target, EMPTY_ARRAY); + return getMethod.invoke(target, (Object[])EMPTY_ARRAY); } catch (IllegalAccessException ex1) { ex1.printStackTrace(); } catch (InvocationTargetException ex2) { diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java index adea073ef3e6..182e96f06bc0 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java @@ -66,7 +66,7 @@ public class MethodInvocation public MethodInvocation(String methodName, Object obj, Class paramClass) throws NoSuchMethodException { - this(paramClass == null ? obj.getClass().getMethod(methodName, null) : obj.getClass().getMethod(methodName, new Class[] + this(paramClass == null ? obj.getClass().getMethod(methodName, (Class[])null) : obj.getClass().getMethod(methodName, new Class[] { paramClass }), obj, paramClass); @@ -91,7 +91,7 @@ public class MethodInvocation } else { - return mMethod.invoke(mObject, EMPTY_ARRAY); + return mMethod.invoke(mObject, (Object[])EMPTY_ARRAY); } } -- cgit