I think the correct way to suppress this is:
@SuppressWarnings("ResourceType")
I am prompted for this when I press Alt-Enter to trigger corrections for the warning, and select Constant and resource type uncertainty check options > Suppress for class (attached screenshot)
.
This works for me.
It is possible that the identifier for this check has changed because the code you referenced was written; I briefly looked at the commit logs, but could not find a link to it.
source share