javavscode icon indicating copy to clipboard operation
javavscode copied to clipboard

No support for @SupressWarnings

Open PedroSaraviaQ opened this issue 1 year ago • 1 comments

Unused variables are still underlined even when SupressWarnings is applied. This did not happen when working with the RedHat extension.

@SuppressWarnings("unused")
public class Abstraction {

    public static void main(String[] args) {
        Object object = new Object();
    }
}

image image

PedroSaraviaQ avatar Dec 21 '23 15:12 PedroSaraviaQ

Findings from my testing:

  1. @SuppressWarnings("unused") really is ignored, while others, like @SuppressWarnings("static-access") are correctly honored.
  2. Unlike the Red Hat extension, this one doesn't seem to supply Quick Fix for adding/extending @SuppressWarnings for any type of suppressible problem.

pbodnar avatar Mar 05 '24 14:03 pbodnar

PR raised on Netbeans side to fix this issue: https://github.com/apache/netbeans/pull/7548

Achal1607 avatar Jul 05 '24 09:07 Achal1607

PR merged would be available in NB-23

Achal1607 avatar Jul 25 '24 10:07 Achal1607