I am writing an application where I have written a line of code which is giving warning. I am using JDK1.5.
Code snippet is given below:-
And the warning is:-
FormFile ff = (FormFile)cf.getClass().getMethod("getFile"+i+(i!=0 ? ""+i : "),null).invoke(cf,null);
warning: non-varargs call of varargs method with inexact argument type for last parameter;
Please help me out.
Thanks in advance..........................
Casting the null to the required type might get rid of the warning.
On an unrelated note, your code is so full of chained method calls as to be almost impossible to read. Breaking it into separate lines doesn't cost money, and often makes problems easier to diagnose.