List of valid @suppresswarning annotation parameters in Java for Eclipse and IBM RAD IDE

The following is a list of most of the valid @suppresswarning annotation parameters in Java for Eclipse and IBM RAD IDE. The right column shows what those java annotation parameters are used for.

Annotation Param


intfNonInherited interface non-inherited method compatibility
javadoc invalid javadoc
localHiding local variable hiding another variable
maskedCatchBlocks hidden catch block
nls to suppress warnings relative to non-nls string literals
noEffectAssign assignment with no effect
null to suppress warnings relative to null analysis
nullDereference missing null check
over-ann missing @Override annotation
paramAssign assignment to a parameter
pkgDefaultMethod attempt to override package-default method
raw usage a of raw type (instead of a parametrized type)
restriction to suppress warnings relative to usage of discouraged or forbidden references
semicolon unnecessary semicolon or empty statement
serial to suppress warnings relative to missing serialVersionUID field for a serializable class
specialParamHiding constructor or setter parameter hiding another field
static-access to suppress warnings relative to incorrect static access
staticReceiver if a non static receiver is used to get a static field or call a static method
super overriding a method without making a super invocation
suppress enable @SuppressWarnings
synthetic-access to suppress warnings relative to unoptimized access from inner classes
tasks enable support for tasks tags in source code
typeHiding type parameter hiding another type
unchecked to suppress warnings relative to unchecked operations
unnecessaryElse unnecessary else clause
unqualified-field-access to suppress warnings relative to field access unqualified
unused to suppress warnings relative to unused code
unusedArgument unused method argument
unusedImport unused import reference
unusedLabel unused label
unusedLocal unused local variable
unusedPrivate unused private member declaration
unusedThrown unused declared thrown exception
uselessTypeCheck unnecessary cast/instanceof operation
varargsCast varargs argument need explicit cast
warningToken unhandled warning token in @SuppressWarnings


Here is an usage example. As you can see, the piece of code below does not use any annotations and the code has a yellow underline in the method signature. If you hover around the icon on the left bar of the IDE where there will be warning sign, you will notice that the Eclipse IDE has issued warning saying that this method is never called in the class.


But if you put the annotation @SuppressWarning(“unused”), we specifically tell the IDE to ignore the usused methods by suppressing the warnigns. Here is the code after the annotation has been added. Code looks clean, no more annoying warning underline !

[My Video Promotion]
  1. All About Java Garbage Collection : Types, Algorithms, Advantages and Disadvantages
  2. Java Static Import Explained With Easy Example With Source Code
  3. SQL Example To Create Table On MySql DB
  4. Book Review – Drools JBoss Rules 5.X Developer’s Guide by Micahal Bali (Packt Publishing)
  5. List of valid @suppresswarning annotation parameters in Java for Eclipse and IBM RAD IDE
  6. Finding Java System Properties
  7. List of Major Java 7 Features – How java programming language has changed in JDK 7
  8. Date From Timestamp in Long format
  9. How to resolve – java.lang.VerifyError java.lang.SecurityException: Signers of org.junit.runner.Runner do not match signers of other classes in package
  10. Complete List Of Java Keywords
  11. List of 25 Plus Devices That Run On Java
  12. What is the difference between java and javaw?
  13. These 100 plus programming languages run on Java Virtual machine (List)
  14. Read XML File In JAVA using DOM – A Simple Tutorial
Tagged , , , , , , , , , , , , . Bookmark the permalink.

5 Responses to Read XML File In JAVA using DOM – A Simple Tutorial

  1. harry says:

    I need a tutorial on an exact opposite of this excellent article. That is I need to serialize Java Object to XML. Can you help me in that Kushal??? I wud appreciate it a lot.


  2. Jim says:

    Hey Kushal!
    This is very great and helpful, but I got another question about that. If I have an Element which hasn’t any values, I always get a NullpointerException. Do you have an Idea how to fix/catch that?

    Thank you!

  3. Mridula says:

    The advantage in Java is that there it is not necessary to take care of objects which are no longer used. Garbage collector takes care of these objects unlike C/C++ language where because of this issue the program terminates causing OutOfMemoryErrors.

  4. priya says:

    Garbage collection is one of the most important feature of Java. Garbage collection is also called automatic memory management as JVM automatically removes the unused variables/objects (value is null) from the memory.

Leave a Reply to kushalzone Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.