On Wed, 11 Sep 2024 21:50:52 GMT, Kevin Driver <kdri...@openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 148: >> >>> 146: // JDK 17 >>> 147: // Also, JEP 305 came out in JDK 14, so we can't declare a >>> variable >>> 148: // in instanceof either >> >> Personally I don't care about these restrictions. Backporters can modified >> to code to suit their releases. > > @wangweij: No change necessary. Personal opinion. These comments are here to > stave off reviewer comments that may suggest doing it differently and to > reflect my choice to ease the job of backporters. This commentary about backporting doesn't belong in the code comments. While it is desirable to avoid dependencies in _APIs_ for features that might be backported, it is acceptable to use new JDK features in the _implementation_, especially if they make the code more efficient, readable, etc. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1761964225