XLint

Discussion in 'Java' started by Francois Lionet, Apr 24, 2007.

  1. Hello all,

    I have a big project with more than 700 files. I work under Netbeans. When I
    compile them I get a message saying that "Some input files use unchecked or
    unsafe operations." and I am told to recompile with the "-XLint:unchecked"
    to know more.
    OK, but I cannot find where to put this operator, I have looked in the ant
    file properties and no success. Can someone tell me where I can use this
    operator and findout what is wrong with my source code?
    Thanks in advance,

    Francois
    Francois Lionet, Apr 24, 2007
    #1
    1. Advertising

  2. Francois Lionet

    Eric Sosman Guest

    Francois Lionet wrote On 04/24/07 13:14,:
    > Hello all,
    >
    > I have a big project with more than 700 files. I work under Netbeans. When I
    > compile them I get a message saying that "Some input files use unchecked or
    > unsafe operations." and I am told to recompile with the "-XLint:unchecked"
    > to know more.
    > OK, but I cannot find where to put this operator, I have looked in the ant
    > file properties and no success. Can someone tell me where I can use this
    > operator and findout what is wrong with my source code?
    > Thanks in advance,


    In the Projects view, right-click your project and
    open its Properties. Expand the Build tree (if it isn't
    already expanded) and click on Compiling. Add all your
    favorite javac options in the box in the right-hand side.
    Click OK. Recompile.

    --
    Eric Sosman, Apr 24, 2007
    #2
    1. Advertising

  3. Francois Lionet

    Lew Guest

    Eric Sosman wrote:
    > Francois Lionet wrote On 04/24/07 13:14,:
    >> Hello all,
    >>
    >> I have a big project with more than 700 files. I work under Netbeans. When I
    >> compile them I get a message saying that "Some input files use unchecked or
    >> unsafe operations." and I am told to recompile with the "-XLint:unchecked"
    >> to know more.


    There is no such option. Do you mean the "-Xlint" option?

    >> OK, but I cannot find where to put this operator,


    It's not an operator, it's a command-line option to the javac compiler.

    >> I have looked in the ant file properties and no success.


    It's not a file property, it's a command-line option to the javac compiler.

    >> Can someone tell me where I can use this operator and findout what is wrong with my source code?


    You have mixed generic and raw types in your code. Did you google for "Java
    unhecked operations"?

    You can either not mix raw types and generics, not always possible, or use
    @SuppressWarnings to get rid of the message if you're doing it on purpose.
    <http://mindprod.com/jgloss/annotations.html#SUPPRESSWARNINGS>

    --
    Lew
    Lew, Apr 25, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve R. Burrus

    What is the -Xlint

    Steve R. Burrus, Mar 7, 2004, in forum: Java
    Replies:
    1
    Views:
    17,148
  2. Flex
    Replies:
    0
    Views:
    482
  3. RC
    Replies:
    2
    Views:
    744
    Greg R. Broderick
    Mar 21, 2007
  4. RC
    Replies:
    2
    Views:
    982
    Greg R. Broderick
    Mar 21, 2007
  5. cyborgali
    Replies:
    1
    Views:
    947
    cyborgali
    Aug 15, 2008
Loading...

Share This Page