LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   javadoc: how to supress a warning for an unused member? (http://www.linuxquestions.org/questions/programming-9/javadoc-how-to-supress-a-warning-for-an-unused-member-4175422624/)

eantoranz 08-17-2012 11:00 AM

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.

byannoni 08-18-2012 11:38 AM

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;
 }




All times are GMT -5. The time now is 07:41 AM.