As the warning instead of null put new Class[]{} ,curly brackets are
empty if there are no parameters in your method



On Dec 2, 4:05 am, "Rene Erwee" <[EMAIL PROTECTED]> wrote:
> Hi Vitor
>
> Thank you very much for your reply.  Working from your example I have
> now been able to compile and run my program successfully so that it
> reads the annotations to my method.  However, the warning below is
> displayed.  I am not sure what exactly it means or what I am supposed to
> do about it.
>
> C:\Documents and
> Settings\Rene\MyOwnAnnotationExample\src\MyOwnAnnotationExample.java:30:
> warning: non-varargs call of varargs method with inexact argument type
> for last parameter;
>
> cast to java.lang.Class for a varargs call
>
> cast to java.lang.Class[] for a non-varargs call and to suppress this
> warning
>
>          Method m = c.getClass().getMethod("calculateCosts",null);
>
> 1 warning
>
> Any ideas?
>
> Thanks
>
> Kind regards
>
> Rene Erwee

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to