Wrong information in the java.nio.ByteBuffer document

Kerem Salihoğlu rizeli2777 at gmail.com
Tue Jun 28 19:40:39 UTC 2022


In the java.nio.ByteBuffer document, there is an example about floats

 float  getFloat()
 float  getFloat(int index)
  void  putFloat(float f)
  void  putFloat(int index, float f)

which says putFloat methods are void but this is wrong, they
return ByteBuffer itself.

The oldest document I found as archive
https://www.oracle.com/java/technologies/java-archive-142docs-downloads.html,
the oldest document I found online
https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html, and
the early access document for Java 19
https://download.java.net/java/early_access/loom/docs/api/java.base/java/nio/ByteBuffer.html
have the same example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20220628/825c598c/attachment-0001.htm>


More information about the nio-dev mailing list