Are there any specific examples of backward incompatibilities between Java versions?

后端 未结 14 742
孤城傲影
孤城傲影 2020-12-02 12:28

Have there been incompatibilities between Java releases where Java source code/Java class files targeting Java version X won\'t compile/run under version Y (where Y > X) ?

14条回答
  •  醉话见心
    2020-12-02 12:47

    Between 1.3 and 1.4 the interpretation of Long.parseLong(String) handled the empty string differently. 1.3 returns a 0 value, whereas 1.4 throws a NumberFormatException.

    Recompiles aren't needed, but working code stopped working if it relied on the 1.3 behaviour.

提交回复
热议问题