Search code examples
javasonarqubesuppress-warnings

Suppress Sonar's warning on import


Disclaimer: I am not asking about alternative imports. While this information may be useful, feel free to leave a comment; but any answer containing something like use another import will be downvoted. I am asking about how to suppress the warning. Thanks!

Here is the import I use:

import com.sun.xml.ws.developer.JAXWSProperties;

Sonar complains about it saying:

Use classes from the Java API instead of Sun classes. (squid:S1191)

How can I suppress this warning?


Solution

  • Can you please try:

    import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR