How to disable warning in Eclipse - 'Class is a raw type. References to generic type Class<T> should be parameterized'

You can add @SuppressWarnings("rawtypes") to a method, statement or method argument to suppress this warning.

As an example a common one in Eclipse plugins is:

@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)

You Can change the settings in eclipse:

  1. Go to project properties -> Java Compiler -> Errors/Warnings
  2. Enable the - Enable project specific settings
  3. Change warning to ignore.

Tags:

Java

Eclipse