Various language changes, banning underscore, "_", as an identifier (JDK-8061549) and using "var" to indicate local variable type inference (JDK-8151454), create situations where it is reasonable for javac to warn about source constructs that will be forbidden or questionable in future source versions. This includes when a javac is used to compile to older source versions using -source N or --release N, the latter available as of JDK 9.
However, it is also reasonable to allow programmers to suppress warnings today about changes that may or will come tomorrow.
This can be accomplished by defining a "future" lint category, enabled by default, which can be suppressed by SuppressedWarnings.
However, it is also reasonable to allow programmers to suppress warnings today about changes that may or will come tomorrow.
This can be accomplished by defining a "future" lint category, enabled by default, which can be suppressed by SuppressedWarnings.
- relates to
-
JDK-8223303 Compiler support for Switch Expressions
- Resolved
-
JDK-8189146 Have use of "var" in 9 and earlier source versions issue a warning for type declarations
- Resolved
-
JDK-8151454 JEP 286: Local-Variable Type Inference
- Closed
-
JDK-8223305 Compiler Support for Switch Expressions (Second Preview)
- Closed
-
JDK-8061549 Disallow _ as a one-character identifier
- Closed