You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I'm trying to suppress a warning that is appearing all over my project in multiple different classes:
The serializable class [class name] does not declare a static final serialVersionUID field of type long
I know in other IDEs such as IntelliJ and Eclipse, this specific warning can be suppressed for all Java projects. What would be the equivalent operation in VSCode + Language Support for Java extension.
The following are reasons why I cannot declare a serialVersionUID or use @SuppressWarnings, and instead need to suppress the warning for all files open in the VSCode editor:
Writing the @SuppressWarnings would force me to modify code which I am not allowed to modify. The prof only wants students to implement certain areas of the framework.
I would need to make these changes to about 30 classes which is less than ideal.
Environment
Operating System: Windows 10
JDK version: 1.8
Visual Studio Code version: 1.21.1
Java extension version: 0.22.0
Steps To Reproduce
Create Java project
Create class which extends Serializable.
Example below of Messages.java, where Message extends Serializable.
In VSCode, I see that PingRequest and PongReply are both underlined in red.
Current Result
Class name has red underline beneath it. VS Code claims that there is an error because a static final serialVersionUID is not present in the class
Expected Result
There should be a way, such as a setting, where certain particular warnings can be suppressed for all java projects. This feature is available in Eclipse and IntelliJ
Ideally I could modify an extension configuration variable such as:
java.suppressedWarnings = ["serial"]
The text was updated successfully, but these errors were encountered:
ozyman42
changed the title
Suppress Specific Warning. Ex: ""
Suppress Specific Warnings. Ex: "The serializable class [class name] does not declare a static final serialVersionUID field of type long"
Apr 5, 2018
vscode-java doesn't currently expose a way to change messages severity. You need to manually tweak your project's .settings/org.eclipse.jdt.core.prefs as explained in eclipse-jdtls/eclipse.jdt.ls#581 (comment)
Currently I'm trying to suppress a warning that is appearing all over my project in multiple different classes:
I know in other IDEs such as IntelliJ and Eclipse, this specific warning can be suppressed for all Java projects. What would be the equivalent operation in VSCode + Language Support for Java extension.
The following are reasons why I cannot declare a serialVersionUID or use @SuppressWarnings, and instead need to suppress the warning for all files open in the VSCode editor:
Writing the @SuppressWarnings would force me to modify code which I am not allowed to modify. The prof only wants students to implement certain areas of the framework.
I would need to make these changes to about 30 classes which is less than ideal.
Environment
Steps To Reproduce
Example below of Messages.java, where
Message
extendsSerializable
.In VSCode, I see that
PingRequest
andPongReply
are both underlined in red.Current Result
Class name has red underline beneath it. VS Code claims that there is an error because a static final serialVersionUID is not present in the class
Expected Result
There should be a way, such as a setting, where certain particular warnings can be suppressed for all java projects. This feature is available in Eclipse and IntelliJ
Ideally I could modify an extension configuration variable such as:
The text was updated successfully, but these errors were encountered: