On Sun, 24 Jan 2021 14:50:08 GMT, Frederic Thevenet <ftheve...@openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/glass/ui/Application.java line >> 764: >> >>> 762: default: >>> 763: return Optional.empty(); >>> 764: } >> >> This could be a switch expression: >> return switch (lockState) { >> case KeyEvent.KEY_LOCK_OFF -> Optional.of(false); >> case KeyEvent.KEY_LOCK_ON -> Optional.of(true); >> default -> Optional.empty(); >> } >> Also, do we use a space after `switch`? I see many instances both with and >> without in the current source. > > Do we plan to drop support for JDK11 for OpenJFX 17? If not, we'll need to > keep to the classic Switch statement, as Switch expressions were only > introduced in JDK12 or 13 as a preview. > That said, since 17 is going to be the next LTS release, maybe the plan is to > bump the dependency for OpenJFX then? Totally selfish request: It would be great if OpenJFX 17 would retain compatibilty with JDK 11 -- NetBeans allows including JavaFX and will retain JDK 11 compatibility for the foreseable future. I can understand, that at some point, language features will become too important to retain compatibility, but this looks dubious to me. ------------- PR: https://git.openjdk.java.net/jfx/pull/385