Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

suppress unchecked warnings in ant

843793Jan 29 2009 — edited Feb 3 2009
Hi there,

I wish to suppress warnings such as these in my ant build;
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
Going on what the javac ant task allows and what javac itself says to do I think I should have something like;
 <javac srcdir="${srcDir}" destdir="${classDir}">
     <!-- This is only allowed for the srcDir.  Do not do this anywhere else -->
     <compilerarg line="-Xlint:"-unchecked""/>
 </javac>
But this doesn't appear to do what I want. Anyone know exactly how to get these warnings suppressed?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 3 2009
Added on Jan 29 2009
13 comments
4,341 views