I am working on a project that is going on for several months now.
Suddenly when compiling we get the error:
Note: Some input files use unchecked or unsafe operations
Note: Recompile with -Xlint:unchecked for details.
After adding the -Xlint the above message disappear but the only error we get is:
[javac] 1 error
There are however about 45 warning. most of them not new.
Could it be that there is some new warning that I missed that cause the compilation to fail?
Edit:
I forgot to mention that the project builds properly on eclipse.
once a week we build using ant to product a version for the server.
I just want to know if there is a way to pin point the problem otherwise I guess I would have to review last 30 commits or go fix warning by warning.
Edit 2:
Problem fixed. I am not sure what it was exactly but I suspect that editing the my module.gwt.xml using external editor which might have miss-guessed the file encoding, inserted some non-visible characters with a wrong encoding which in turn caused the compiler to give an error w/o a proper description. (maybe I don’t know)
So what lessons should I take from this? handle all warning? (not sure that is always possible.)
using a jenkins? (as @Jayan suggested) the project manager would never approve investing time on such things in my company.
This error normally appears when you use a deprecated version of a class that now takes a Generic parameter. For example, in Java 6 and earlier,
JListtreated everything as Objects, and it was up to the programmer to cast everything correctly. In Java 7,JListis nowJList<E>, with the parameter being the type of Objects contained in the list.JList(without generics) will still work, but you will get an error like the one you are experiencing.EDIT: The reason, by the way, that these operations are considered unsafe is that, without the generics, types cannot be compared at compile time, and must be checked at runtime.