• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Recompile with -Xlint:unchecked for details.

 
Cam Barley
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting an error when i compile my program, can anyone help me? The program will still work like its suppost to, but I would like to fix this error.

Thank you

Note: C:\Documents and Settings\*****\Desktop\Stock.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

 
Matthew Brown
Bartender
Posts: 4567
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried doing what it suggests?

The warnings are caused by using non-generic versions of collection classes, rather than the generic versions that were introduced in Java 5. Like on line 49, where using ArrayList<Stock> would be the recommended approach.

Adding that compiler option gives you more specific details.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that it is a warning not an error. With an error your build will fail while a warning just warns you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic