dubreuia/intellij-plugin-save-actions

Check possible values for annotation @SuppressWarnings

Closed this issue · 2 comments

Given the following class

@SuppressWarnings("WeakerAccess")
public class Foo {
  public void bar() {
  }
}

which is only used in test in the same package.
When option "suppressAnnotation" is switched on, the @SuppressWarnings("WeakerAccess") is removed which in turns leads IntelliJ to warn "Acess can be package-private".

I could say it's not my fault, because I'm just using the "fix unused annotation" quickfix from Intellij, I'm not deciding how it works.

I'm pretty sure Intellij has a list of values for @SuppressWarnings (each IDE / validation lib have a different set). The value "WeakerAccess" might not be a supported value (first time I see it actually).

I'll check if I can find the possible values at least, or find a workaround, but I won't implement special cases in that plugin.

Duplicates #87