some new features of jdk to optimize the code

This commit is contained in:
刘鑫
2023-01-03 18:03:55 +08:00
committed by Oleg Zhurakousky
parent 14edf04189
commit af2df8ba0e
4 changed files with 9 additions and 20 deletions

View File

@@ -111,20 +111,12 @@ public class BindingsLifecycleController {
Binding<?> binding = BindingsLifecycleController.this.locateBinding(bindingName);
if (binding != null) {
switch (state) {
case STARTED:
binding.start();
break;
case STOPPED:
binding.stop();
break;
case PAUSED:
binding.pause();
break;
case RESUMED:
binding.resume();
break;
default:
break;
case STARTED -> binding.start();
case STOPPED -> binding.stop();
case PAUSED -> binding.pause();
case RESUMED -> binding.resume();
default -> {
}
}
}
}