Intellij deprecation warning for java.util.HashMap

xrtm000 :

IntelliJ seems to think that the no-arg constructor of java.util.HashMap is deprecated, as judged by the style in which it marks up the constructor name:

enter image description here

How can I fix it, if I don't want to disable inspections?

UPD: IntelliJ seems to think that the java.util.HashMap class is deprecated

enter image description here

Rob Bygrave :

I had this issue with java.util.List marked as deprecated. Somehow I had marked it as such via an "external annotation".

To remove it:

  • Click through to the source (in my case java.util.List)
  • There should be a @ beside the type, click on it ...
  • Deannotate java.lang.Deprecated

The external annotation on List

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=458208&siteId=1