• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • None
    • core-libs
    • Fix Understood
    • b26

        The following methods/constructors do not match the @since of the enclosing class:

        1. The constructor for `java.util.Properties` `public Properties(int initialCapacity)` is missing an @since tag; it was added in JDK 10.
        2. The method `public static MethodHandle tableSwitch(MethodHandle fallback, MethodHandle... targets)` was added in JDK 17 but is missing an @since tag.
        3. The constructor for java.lang.reflect.MalformedParameterizedTypeException `public MalformedParameterizedTypeException(String message)` was added in JDK 10.
        4. The method `java.nio.MappedByteBuffer:slice:(int,int)` is inherited from `Buffer.java`; this should be mentioned in the documentation, similar to other methods of the class.
           - See:
             - https://github.com/openjdk/jdk/blob/eb4b6fa6212380c9b6d3c94f5aa3384f12a0c125/src/java.base/share/classes/java/nio/MappedByteBuffer.java#L344
             - https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/nio/MappedByteBuffer.java#L415
        5. The method `java.util.zip.Deflater:setDictionary:(java.nio.ByteBuffer)` was added in JDK 11 [6341887: java.util.zip: Add ByteBuffer methods to Inflater/Deflater] but lacks a @since tag. All other added methods have an @since 11 tag except this one.

        The @since tag behavior for overridden methods is inconsistent:

        1. In the example provided, an @since 14 was added for the overriding method even though this method already existed in the JDK since 1.0, and `PrintStream` extends `FilterOutputStream`. Thus, that method was always part of the class. should it have @since 1.0? The @since tag can be deleted
           - See: https://github.com/nizarbenalla/jdk/commit/4d70cdac4f03723eee97f1157cb031a88d182eb1#diff-3f6ae6050c9dc88dbb09cb482f938b6e0a32187fa0dba3c8983bba312ebf8370R612
        2. Also these methods should have an @since 17:
           - `java.util.concurrent.ThreadLocalRandom:nextFloat:(float)`
           - `java.util.concurrent.ThreadLocalRandom:nextFloat:(float,float)`

              nbenalla Nizar Benalla
              nbenalla Nizar Benalla
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: