I am implementing the IProcessFactory interface that has the following method:
IProcess newProcess(ILaunch launch, Process process,
String label, Map attributes);
As you can see it uses the raw Map type. When I implement this method with the same signature Eclipse gives the following warning:
Map is a raw type. References to generic type Map should be parameterized.
Replacing Map with Map<?, ?> gives an error. So what is a proper way to implement such an interface?
To the extent of my knowledge you are forced to use raw types in such situations. Indeed Eclipse refers to them as “unavoidable”.
If you’re using Eclipse you can disable these warnings under the Errors/Warnings section in the preferences.
See this answer for further details: