You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should try to increase the source level of the codebase to Java 17, to gain access to features like var, text blocks, and other Java 11+ niceties. This must not impact the target level, to avoid affecting users.
The text was updated successfully, but these errors were encountered:
I just got bit by trying to set a source level of 17 and a target level of 11 in a maven project. It seems the compiler would not handle that for you (as one would expect given the option to set source and target individually), resulting in the error source release 17 requires target release 17.
JEP 247 elaborates on this, basically recommending to use release instead of source and target. The release option adds a "documented APIs" parameter when used with "modern" java versions (>=9) and sets source and target to the same value. I wonder if by setting the correct value of this extra parameter a correct backwards compilation could be achieved.
We should try to increase the source level of the codebase to Java 17, to gain access to features like
var
, text blocks, and other Java 11+ niceties. This must not impact the target level, to avoid affecting users.The text was updated successfully, but these errors were encountered: