- switch (commandType) {
- case MODEL:
- return modelHandler.executeRestCommand(session, commandType, command, name, version);
- case KEY_INFO:
- return keyInfoHandler.executeRestCommand(session, commandType, command, name, version);
- case CONTEXT_SCHEMA:
- return contextSchemaHandler.executeRestCommand(session, commandType, command, name, version);
- case CONTEXT_ALBUM:
- return contextAlbumHandler.executeRestCommand(session, commandType, command, name, version);
- case EVENT:
- return eventHandler.executeRestCommand(session, commandType, command, name, version);
- case TASK:
- return taskHandler.executeRestCommand(session, commandType, command, name, version);
- case POLICY:
- return policyHandler.executeRestCommand(session, commandType, command, name, version);
- default:
- return new ApexApiResult(Result.FAILED, REST_COMMAND_NOT_RECOGNISED);
- }
+ return switch (commandType) {
+ case MODEL -> modelHandler.executeRestCommand(session, commandType, command, name, version);
+ case KEY_INFO -> keyInfoHandler.executeRestCommand(session, commandType, command, name, version);
+ case CONTEXT_SCHEMA ->
+ contextSchemaHandler.executeRestCommand(session, commandType, command, name, version);
+ case CONTEXT_ALBUM -> contextAlbumHandler.executeRestCommand(session, commandType, command, name, version);
+ case EVENT -> eventHandler.executeRestCommand(session, commandType, command, name, version);
+ case TASK -> taskHandler.executeRestCommand(session, commandType, command, name, version);
+ case POLICY -> policyHandler.executeRestCommand(session, commandType, command, name, version);
+ default -> new ApexApiResult(Result.FAILED, REST_COMMAND_NOT_RECOGNISED);
+ };