Skip to content

addFinalModifier save action cannot be disabled #3370

@knutae

Description

@knutae

After upgrading to the latest version (1.24.0), final modifiers are added to parameters and variables on save, even though the addFinalModifier has been explicitly omitted from the Java save actions settings.

Environment
  • Operating System: Ubuntu 22.04
  • JDK version: 17.0.9
  • Visual Studio Code version: 1.83.1
  • Java extension version: 1.24.0
Steps To Reproduce
  1. Configure Java Save Actions to only contain addOverride. E.g.: "java.cleanup.actionsOnSave": ["addOverride"]
  2. Edit and save any Java file, and observe that final modifiers are added automatically.
Current Result

Final modifiers are added during save, and there does not appear to be a way to disable this.

Expected Result

Final modifiers should only be added if the "addFinalModifier" save action is configured.

Additional Information

The issue exists both in 1.24.0 and the latest prerelease version. Downgrading the plugin to 1.23.0 fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions