LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-17-2012, 10:00 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,957
Blog Entries: 1

Rep: Reputation: 81
javadoc: how to supress a warning for an unused member?


Hi!

I have three related static final String members in a class and then in another member of the class I select which of the three I want to use... then the other two get an "Unused member" warning from java. Is there a way with javadoc tags to tell the compiler to avoid this warning?

Thanks in advance.
 
Old 08-18-2012, 10:38 AM   #2
byannoni
Member
 
Registered: Aug 2012
Location: /home/byannoni
Distribution: Arch
Posts: 128

Rep: Reputation: 36
I'm not a Java programmer, but perhaps this will help:
Quote:
Since Java 5.0, you can disable compilation warnings relative to a subset of a compilation unit using the java.lang.SuppressWarning annotation.

Code:
 @SuppressWarning("unused") public void foo() {
  String s;
 }
 
  


Reply

Tags
java, javadoc, warning


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 03:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration