Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 08-17-2012, 10:00 AM   #1
Senior Member
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

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


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
Registered: Aug 2012
Location: /home/byannoni
Distribution: Arch
Posts: 128

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

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


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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:24 AM.

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