Skip to content

MinimumSwitchCases should keep comments #6

@koppor

Description

@koppor

Current:

-                switch (keyBinding.get()) {
-                    case DELETE_ENTRY:
-                        new DeleteFileAction(dialogService, preferencesService, databaseContext,
-                                viewModel, listView).execute();
-                        event.consume();
-                        break;
-                    default:
-                        // Pass other keys to children
+                if (keyBinding.get() == KeyBinding.DELETE_ENTRY) {
+                    new DeleteFileAction(dialogService, preferencesService, databaseContext,
+                            viewModel, listView).execute();
+                    event.consume();
+                } else {

Expected:

               if (keyBinding.get() == KeyBinding.DELETE_ENTRY) {
                   new DeleteFileAction(dialogService, preferencesService, databaseContext,
                           viewModel, listView).execute();
                   event.consume();
               } else {
                   // Pass other keys to children

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions